home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / 4dos / 4dos401d.zip / 4DOS.DOC next >
Text File  |  1992-06-08  |  1MB  |  21,933 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                             44
  9.                            44
  10.                           44      DDDDDDD        OOOOO        SSSSSS
  11.                          44       DDDDDDDD      OOOOOOO      SSSSSSSS
  12.                         44  44    DD     DD    OO     OO    SS
  13.                        44   44    DD     DD    OO     OO    SS
  14.                       44    44    DD     DD    OO     OO     SSSSSS
  15.                      444444444    DD     DD    OO     OO      SSSSSS
  16.                       44444444    DD     DD    OO     OO           SS
  17.                             44    DD     DD    OO     OO           SS
  18.                             44    DDDDDDDD      OOOOOOO     SSSSSSSS
  19.                             44    DDDDDDD        OOOOO       SSSSSS
  20.  
  21.  
  22.  
  23.  
  24.                                        Version 4.01
  25.  
  26.  
  27.  
  28.  
  29.  
  30.                                        Developed By
  31.                                   Rex Conn and Tom Rawson
  32.  
  33.                                      Documentation By
  34.                          Hardin Brothers, Tom Rawson, and Rex Conn
  35.  
  36.  
  37.  
  38.                                        Published By
  39.  
  40.                                      JP Software Inc.
  41.                                        P.O. Box 1470
  42.                                  East Arlington, MA 02174
  43.                                             USA
  44.  
  45.                                       (617) 646-3975
  46.                                     fax (617) 646-0904
  47.  
  48.  
  49.  
  50.               Program and Documentation Copyright 1988, 1989, 1990, 1991,
  51.               1992, Rex C. Conn and JP Software Inc., All Rights Reserved.
  52.               4DOS is a registered trademark and 4OS2 is a trademark of JP
  53.               Software Inc.  Other product and company names are trademarks
  54.               of their respective owners.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                                     ACKNOWLEDGMENTS
  61.  
  62.  
  63.  
  64.  
  65.               We couldn't produce a product like 4DOS without the dedication
  66.               and quality work of many people.  Our thanks to:
  67.  
  68.                    JP Software Staff:  Mike Bessy, Kevin Cocilo, Helen
  69.                    Coyne, Hayyim Feldman, Henry Harvey, Ellen Stone, Misty
  70.                    White.
  71.  
  72.                    Beta Test Support:  David Moskowitz, Guy Scharf, Larry
  73.                    Finkelstein, and Martin Schiff, of CompuServe's CONSULT
  74.                    forum.
  75.  
  76.                    Online Support:  Brian Miller and Tess Heder of Channel 1
  77.                    BBS; Don Watkins of CompuServe's IBMNET.
  78.  
  79.                    Help System:  Scott McGrath and Ross Neilson Wentworth.
  80.  
  81.                    Beta Testers:  We can't list all of our beta testers
  82.                    here!  A special thanks to all of you who helped make
  83.                    4DOS elegant, reliable, and friendly.
  84.  
  85.  
  86.  
  87.               The following tools are used in creating and maintaining 4DOS
  88.               and the 4DOS Help System:
  89.  
  90.                  Compilers:        Microsoft C 6.0 and Macro Assembler 5.1
  91.                                    and 6.0, Borland Turbo Pascal 5.5 and 6.0
  92.                  Libraries:        Turbo Professional (Turbo Power Software),
  93.                                    Spontaneous Assembly (Base Two
  94.                                    Development)
  95.                  Editors:          Edix (Emerging Technology), Brief
  96.                                    (Solution Systems)
  97.                  Debuggers:        Periscope (The Periscope Company), Soft-
  98.                                    ICE (Nu-Mega Technologies)
  99.                  Version Control:  PVCS (Sage Software)
  100.                  Documentation:    Microsoft Word for Windows with Adobe Type
  101.                                    Manager
  102.  
  103.                                                                      CONTENTS
  104.           ___________________________________________________________________
  105.  
  106.  
  107.  
  108.           CONTENTS
  109.  
  110.  
  111.           Introduction...............................................1
  112.                How to Use This Manual................................2
  113.                Registration and Upgrade Information..................5
  114.                Technical Support.....................................7
  115.  
  116.           Chapter 1 / 4DOS Features..................................9
  117.  
  118.           Chapter 2 / Installation..................................13
  119.                Automated Installation...............................13
  120.                Manual Installation..................................14
  121.                Uninstalling 4DOS....................................15
  122.  
  123.           Chapter 3 / A Guided Tour of 4DOS.........................18
  124.                Starting The Tour....................................18
  125.                Basic Commands.......................................20
  126.                Command Line Editing and History.....................24
  127.                More About Files.....................................27
  128.                Directory Navigation.................................32
  129.                Aliases..............................................33
  130.                Other Commands.......................................36
  131.                Batch Programming....................................38
  132.                Conclusion...........................................40
  133.  
  134.           Chapter 4 / General Concepts..............................41
  135.                DOS and the Command Interpreter......................41
  136.                     Primary and Secondary Shells....................42
  137.                     AUTOEXEC.BAT, 4START, and 4EXIT.................43
  138.                Command Processing...................................43
  139.                Files and Paths......................................45
  140.                The Environment......................................48
  141.                Memory...............................................49
  142.                ASCII and Key Codes..................................51
  143.                The Keyboard.........................................51
  144.                Video................................................52
  145.                ANSI Drivers.........................................53
  146.  
  147.           Chapter 5 / Using 4DOS....................................54
  148.                At the Command Line..................................54
  149.                     Command Line Editing............................55
  150.                     Command History and Recall......................56
  151.                     Command History Window..........................58
  152.                     Filename Completion.............................59
  153.                     Multiple Commands...............................61
  154.                     Automatic Directory Changes.....................61
  155.  
  156.  
  157.           ___________________________________________________________________
  158.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  i
  159.  
  160.                                                                      CONTENTS
  161.           ___________________________________________________________________
  162.  
  163.  
  164.                     Temporarily Disabling Aliases...................62
  165.                     Command Line Help...............................63
  166.                Input and Output.....................................65
  167.                     Redirection.....................................66
  168.                     Piping..........................................67
  169.                     Keystack........................................68
  170.                File Processing......................................71
  171.                     Extended Parent Directory Names.................71
  172.                     Wildcards.......................................71
  173.                     Multiple Filenames..............................74
  174.                     Include Lists...................................75
  175.                     Executable Extensions...........................76
  176.                The Environment......................................78
  177.                     4DOS Configuration Variables....................80
  178.                     4DOS Internal Variables.........................81
  179.                     4DOS Variable Functions.........................86
  180.                Advanced Features....................................92
  181.                     Conditional Commands............................92
  182.                     Command Grouping................................92
  183.                     Escape Character................................94
  184.                     Argument Quoting................................95
  185.                Aliases..............................................97
  186.                Batch Files..........................................99
  187.                     .BAT Files and .BTM Files......................100
  188.                     Echoing........................................100
  189.                     Batch File Variables...........................101
  190.                     Batch File Commands............................102
  191.                     Batch File Tips................................104
  192.  
  193.           Chapter 6 / Options and Tuning...........................110
  194.                Configuration Files.................................110
  195.                Setting up CONFIG.SYS...............................111
  196.                     4DOS and DOS 2.................................114
  197.                     Startup Options for Secondary Shells...........114
  198.                Using AUTOEXEC.BAT..................................116
  199.                Using 4START and 4EXIT..............................118
  200.                Using the 4DOS.INI File.............................119
  201.                     Types of Directives............................123
  202.                     Initialization Directives......................125
  203.                     Configuration Directives.......................129
  204.                     Color Directives...............................132
  205.                     Key Mapping Directives.........................133
  206.                     Advanced Directives............................138
  207.                     Examples.......................................141
  208.  
  209.           Chapter 7 / Using 4DOS with Your Hardware and Software...143
  210.                Hardware............................................143
  211.                     The CPU........................................143
  212.  
  213.  
  214.           ___________________________________________________________________
  215.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  ii
  216.  
  217.                                                                      CONTENTS
  218.           ___________________________________________________________________
  219.  
  220.  
  221.                     Memory.........................................144
  222.                     Video..........................................146
  223.                     Hard Drives and Floppy Disks...................148
  224.                     Laptop and Notebook Computers..................150
  225.                     Critical Errors................................151
  226.                Software............................................153
  227.                     4DOS and DOS...................................153
  228.                     Task Switchers and Multitaskers................154
  229.                     Multitasking and Disk Swapping.................156
  230.                     4DOS and Microsoft Windows 3.0.................156
  231.                     4DOS and DESQview..............................158
  232.                     Using 4DOS on a Network........................159
  233.                Solving Software Compatibility Problems.............161
  234.  
  235.           Chapter 8 / Command Reference Guide......................167
  236.                4DOS Commands.......................................167
  237.                How to Use the Command Descriptions.................169
  238.                ?...................................................173
  239.                ALIAS...............................................174
  240.                ATTRIB..............................................183
  241.                BEEP................................................185
  242.                BREAK...............................................186
  243.                CALL................................................187
  244.                CANCEL..............................................189
  245.                CD / CHDIR..........................................190
  246.                CDD.................................................192
  247.                CHCP................................................194
  248.                CLS.................................................195
  249.                COLOR...............................................197
  250.                COPY................................................198
  251.                CTTY................................................204
  252.                DATE................................................205
  253.                DEL / ERASE.........................................206
  254.                DELAY...............................................208
  255.                DESCRIBE............................................209
  256.                DIR.................................................211
  257.                DIRS................................................217
  258.                DRAWBOX.............................................218
  259.                DRAWHLINE...........................................220
  260.                DRAWVLINE...........................................221
  261.                ECHO................................................222
  262.                ECHOS...............................................224
  263.                ENDLOCAL............................................225
  264.                ESET................................................226
  265.                EXCEPT..............................................227
  266.                EXIT................................................229
  267.                FOR.................................................230
  268.                FREE................................................234
  269.  
  270.  
  271.           ___________________________________________________________________
  272.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  iii
  273.  
  274.                                                                      CONTENTS
  275.           ___________________________________________________________________
  276.  
  277.  
  278.                GLOBAL..............................................235
  279.                GOSUB...............................................237
  280.                GOTO................................................239
  281.                HELP................................................241
  282.                HISTORY.............................................243
  283.                IF..................................................245
  284.                IFF.................................................251
  285.                INKEY...............................................253
  286.                INPUT...............................................256
  287.                KEYSTACK............................................257
  288.                LH / LOADHIGH.......................................261
  289.                LIST................................................262
  290.                LOADBTM.............................................264
  291.                LOG.................................................266
  292.                MD / MKDIR..........................................268
  293.                MEMORY..............................................269
  294.                MOVE................................................270
  295.                PATH................................................274
  296.                PAUSE...............................................276
  297.                POPD................................................277
  298.                PROMPT..............................................278
  299.                PUSHD...............................................281
  300.                QUIT................................................283
  301.                RD / RMDIR..........................................284
  302.                REBOOT..............................................285
  303.                REM.................................................287
  304.                REN / RENAME........................................288
  305.                RETURN..............................................290
  306.                SCREEN..............................................291
  307.                SCRPUT..............................................292
  308.                SELECT..............................................293
  309.                SET.................................................298
  310.                SETDOS..............................................301
  311.                SETLOCAL............................................305
  312.                SHIFT...............................................306
  313.                SWAPPING............................................307
  314.                TEE.................................................308
  315.                TEXT................................................309
  316.                TIME................................................310
  317.                TIMER...............................................311
  318.                TRUENAME............................................313
  319.                TYPE................................................314
  320.                UNALIAS.............................................315
  321.                UNSET...............................................316
  322.                VER.................................................318
  323.                VERIFY..............................................319
  324.                VOL.................................................320
  325.                VSCRPUT.............................................321
  326.  
  327.  
  328.           ___________________________________________________________________
  329.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  iv
  330.  
  331.                                                                      CONTENTS
  332.           ___________________________________________________________________
  333.  
  334.  
  335.                Y...................................................322
  336.  
  337.           Appendix A / 4DOS Error Messages.........................323
  338.  
  339.           Appendix B / ASCII and Key Codes.........................334
  340.                ASCII...............................................334
  341.                Keys and Key Codes..................................338
  342.  
  343.           Appendix C / Technical Information.......................344
  344.                Detecting 4DOS......................................344
  345.                     Detecting 4DOS From a Batch File...............344
  346.                     Detecting 4DOS From a Program..................344
  347.                     Detecting the 4DOS Prompt......................345
  348.                Placing Keystrokes Into the Keystack................345
  349.                Writing Installable Commands........................346
  350.                Using DESCRIPT.ION..................................347
  351.                Interrupt 2E........................................349
  352.  
  353.           Glossary.................................................351
  354.  
  355.           Index....................................................363
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.           ___________________________________________________________________
  386.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  v
  387.  
  388.                                                        CONTACTING JP SOFTWARE
  389.           ___________________________________________________________________
  390.  
  391.  
  392.  
  393.  
  394.           CONTACTING JP SOFTWARE
  395.  
  396.           You can contact JP Software at any of the following addresses.  Our
  397.           normal business hours are 9:00 AM to 5:00 PM weekdays, eastern US
  398.           time.  For more information about contacting us for technical
  399.           support see page 7.
  400.  
  401.  
  402.               By mail:
  403.  
  404.                    JP Software Inc.
  405.                    P.O. Box 1470
  406.                    East Arlington, MA 02174
  407.                    USA
  408.  
  409.  
  410.               By telephone:
  411.  
  412.                    Voice:          (617) 646-3975
  413.                    Fax:            (617) 646-0904
  414.                    Order Line:     (800) 368-8777 (orders only,
  415.                                    USA only)
  416.  
  417.  
  418.               Electronically:
  419.  
  420.                    CompuServe:     Customer Service 75020,244
  421.                                    Technical Support 75300,1215
  422.                                    General 75300,210
  423.                    Bix:            "jpsoft"
  424.                    MCI Mail:       470-7811
  425.                    Internet:       Customer Service 75020.244@compuserve.com
  426.                                    Technical Support
  427.                                         75300.1215@compuserve.com
  428.                                    General 75300.210@compuserve.com
  429.                    BBS Support:    Via Channel 1 BBS, Boston,
  430.                                    617-354-8873 at 2400 baud, no
  431.                                    parity, 8 data bits, 1 stop bit
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.           ___________________________________________________________________
  443.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  vi
  444.  
  445.                                                                  INTRODUCTION
  446.           ___________________________________________________________________
  447.  
  448.  
  449.  
  450.           INTRODUCTION
  451.  
  452.  
  453.           Welcome, and thanks for purchasing 4DOS!
  454.  
  455.           We started developing 4DOS when we realized that our computers
  456.           could be a lot more powerful and a lot more helpful than they were.
  457.           Whether you are a computer novice or an experienced power user, we
  458.           think that 4DOS will help you get the most out of your IBM PC or
  459.           compatible computer.
  460.  
  461.           Technically, 4DOS is a command interpreter or "DOS Shell."  That
  462.           means that it reacts to the commands you type at the C> prompt.
  463.           We've designed 4DOS so that you don't have to change your computing
  464.           habits or unlearn anything to use it.  If you know how to display a
  465.           directory, copy a file, or start an application program, you
  466.           already know how to use 4DOS.  4DOS understands all of the commands
  467.           you know and adds to them.  Its purpose is to make DOS friendlier,
  468.           easier to use, and much more powerful and versatile, without
  469.           requiring you to use or learn a new program, a new set of commands,
  470.           or a new style of work.
  471.  
  472.           Once you have 4DOS installed, you can learn its new features at
  473.           your own pace.  It has more than 40 new commands and scores of
  474.           enhanced features, but you don't have to learn them all at once.
  475.           Relax, enjoy 4DOS's power, and browse through the manual
  476.           occasionally.  Press the F1 key whenever you need help.  4DOS will
  477.           soon become an essential part of your computer, and you'll wonder
  478.           how you ever got along without it.
  479.  
  480.           If you want to take 4DOS for a spin without performing a complete
  481.           installation, see the Guided Tour beginning on page 18.
  482.  
  483.           We are constantly working to improve 4DOS.  If you have suggestions
  484.           for features or commands that you think we should include in the
  485.           next version, or any other way we could improve our product, please
  486.           let us know.  Many of the improvements in this version of 4DOS were
  487.           suggested by our users, and while we can't promise to include every
  488.           suggested feature, we really do appreciate and pay attention to
  489.           your comments.
  490.  
  491.           If you're an OS/2 user, JP Software offers another product, 4OS2,
  492.           as a complete replacement for the OS/2 command processor (CMD.EXE).
  493.           4OS2 provides the same command set and syntax as 4DOS, with several
  494.           OS/2 commands added.  You can use it to maintain a common working
  495.           environment and run the same batch files under OS/2 and DOS.  4OS2
  496.  
  497.  
  498.  
  499.           ___________________________________________________________________
  500.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  1
  501.  
  502.                                                                  INTRODUCTION
  503.           ___________________________________________________________________
  504.  
  505.  
  506.           is available at a discounted price for 4DOS users.  Contact JP
  507.           Software for more information.
  508.  
  509.  
  510.           How to Use This Manual
  511.  
  512.               We have designed this manual to serve as a gentle introduction
  513.               to 4DOS for novice users, as a tutorial for those who want to
  514.               get the most out of 4DOS, and as a reference manual for
  515.               advanced 4DOS users.
  516.  
  517.               You will likely find some parts of the manual too simple or
  518.               too technical for your tastes.  Unless you are convinced that
  519.               one of those sections holds just the information you need for
  520.               a specific task, feel free to skip to the next part of the
  521.               manual that is more to your liking.  You can use almost every
  522.               feature of 4DOS without having to worry about other features
  523.               or commands.
  524.  
  525.               As you read the manual, you will see the symbol ## next to
  526.               certain paragraphs.  This indicates a more in-depth discussion
  527.               or a more advanced topic which you can skip if you wish to
  528.               stick with the basics.  Come back to this topic later for more
  529.               details, or if you're having trouble with the particular issue
  530.               it discusses.  In many cases, the remainder of the section
  531.               you're reading after such a symbol will be devoted to similar
  532.               advanced information.  If you see the ## next to a section
  533.               heading, it means the entire section contains such
  534.               information.
  535.  
  536.               You may find the information in such marked sections useful
  537.               even if you're relatively new to computers or to 4DOS.
  538.               However you can skip the marked section and still understand
  539.               and use the basic topic of the section you're reading.
  540.  
  541.               An exclamation point [!] to the left of a paragraph means that
  542.               paragraph contains a caution or warning you may need to
  543.               observe when using the feature it discusses.
  544.  
  545.               This manual is divided into eight chapters and three
  546.               appendices, plus a glossary and index.  Here's a brief
  547.               overview of what you'll find in each:
  548.  
  549.               Chapter 1 / 4DOS Features
  550.  
  551.                    We begin with a short summary of some of 4DOS's features
  552.                    to give you a taste of what 4DOS is about.  Start here if
  553.                    you are new to 4DOS.
  554.  
  555.  
  556.           ___________________________________________________________________
  557.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  2
  558.  
  559.                                                                  INTRODUCTION
  560.           ___________________________________________________________________
  561.  
  562.  
  563.  
  564.               Chapter 2 / Installation
  565.  
  566.                    Everyone should read this short chapter.  The
  567.                    installation instructions are simple (and quite different
  568.                    from previous versions of 4DOS).
  569.  
  570.               Chapter 3 / A Guided Tour of 4DOS
  571.  
  572.                    This chapter will take you on a short, interactive tour
  573.                    of some of 4DOS's most powerful features.  By the time
  574.                    you finish the tour, you will have a good idea of what
  575.                    4DOS will do for you.  If you are new to 4DOS, be sure to
  576.                    take the tour.
  577.  
  578.               Chapter 4 / General Concepts
  579.  
  580.                    This reference chapter is an introduction to several
  581.                    terms and concepts that we use throughout the manual.  If
  582.                    you're a novice, you might want to browse through the
  583.                    entire chapter.  If you're a power user and all of the
  584.                    topics in this chapter seem simple, then go on to the
  585.                    next chapter.  If you think you need to brush up a bit on
  586.                    the basics of a couple of terms and ideas, you'll
  587.                    probably find them here.
  588.  
  589.               Chapter 5 / Using 4DOS
  590.  
  591.                    This chapter is for everyone.  It contains a description
  592.                    of 4DOS's features and lots of examples to help you learn
  593.                    to use each one.  Even if you are a novice user and want
  594.                    to ignore some of these features until later, skim
  595.                    through this chapter to get an idea of what is available
  596.                    and where to find the information that you will
  597.                    eventually want.  4DOS offers both features which are not
  598.                    related to specific commands, and a complete set of over
  599.                    80 internal commands.  This chapter has complete
  600.                    reference information on all of the non-command features,
  601.                    and introduces a few commands as well.  Reference
  602.                    information on 4DOS commands is in Chapter 8.
  603.  
  604.               Chapter 6 / Options and Tuning
  605.  
  606.                    This chapter is for advanced users who want to be sure
  607.                    that 4DOS is running at top efficiency on their systems.
  608.                    It includes detailed information on setting up 4DOS and
  609.                    on changing your 4DOS configuration.
  610.  
  611.  
  612.  
  613.           ___________________________________________________________________
  614.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  3
  615.  
  616.                                                                  INTRODUCTION
  617.           ___________________________________________________________________
  618.  
  619.  
  620.  
  621.               Chapter 7 / Using 4DOS With Your Hardware and Software
  622.  
  623.                    This chapter contains tips on using 4DOS with many
  624.                    popular kinds of PC hardware and software, and
  625.                    information that will be useful if you think 4DOS may
  626.                    conflict with your hardware or other software.
  627.  
  628.               Chapter 8 / 4DOS Command Reference
  629.  
  630.                    4DOS knows over 80 internal commands.  This chapter
  631.                    explains the purpose of each command and tells you how to
  632.                    use it.  It has examples that will help you learn each
  633.                    command and the technical details you will need to get
  634.                    the command to behave exactly as you wish.
  635.  
  636.               Appendices
  637.  
  638.                    We've included some helpful tables here, and some
  639.                    information for those who like to know technical details.
  640.                    There are three appendices.
  641.  
  642.                    Appendix A lists all 4DOS error messages.  Look here if
  643.                    you need an explanation of an error message, or if you
  644.                    aren't sure if the message came from 4DOS.
  645.  
  646.                    Appendix B lists codes for the ASCII character set (your
  647.                    computer's internal method for representing letters,
  648.                    digits, and other characters) and for the keys on your
  649.                    keyboard.  These codes can be useful with certain 4DOS
  650.                    commands.
  651.  
  652.                    Appendix C covers technical information and programming
  653.                    interfaces.  You shouldn't need to use it unless you are
  654.                    an advanced user or a programmer writing add-on software
  655.                    for 4DOS.
  656.  
  657.               Glossary
  658.  
  659.                    If you need help with any of the terminology in this
  660.                    manual, look here.
  661.  
  662.               Index
  663.  
  664.                    If you can't find the information you need, this should
  665.                    help you find it.
  666.  
  667.  
  668.  
  669.  
  670.           ___________________________________________________________________
  671.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  4
  672.  
  673.                                                                  INTRODUCTION
  674.           ___________________________________________________________________
  675.  
  676.  
  677.  
  678.               Quick Reference Card
  679.  
  680.                    If you can't remember a key combination, command format,
  681.                    color name, or other general information, look here.
  682.                    Whether you are a 4DOS novice or expert, you will
  683.                    probably want to keep the Quick Reference card near your
  684.                    computer for those times when you need just a small jog
  685.                    to your memory.
  686.  
  687.               Additional Files
  688.  
  689.                    Files distributed with 4DOS cover important additional
  690.                    information beyond what's included in this manual.
  691.                    README.DOC contains general notes, highlights of the
  692.                    latest release, and brief installation instructions for
  693.                    those upgrading from a downloaded copy of 4DOS.
  694.                    UPDATE.DOC covers any changes or corrections in the
  695.                    manual, and detailed information for users with older
  696.                    versions on what has changed in the latest release.
  697.                    APPNOTES.DOC contains application notes for a variety of
  698.                    other software packages to help you use those packages to
  699.                    best advantage with 4DOS.
  700.  
  701.  
  702.           Registration and Upgrade Information
  703.  
  704.               If you purchased 4DOS from a software dealer, your copy came
  705.               with a registration card.  Please fill out this card and
  706.               return it promptly to JP Software.  Returning the registration
  707.               card ensures that we have a record of your registration, and
  708.               enables you to receive ongoing technical support and notices
  709.               of upgrades.  If you purchased 4DOS directly from JP Software,
  710.               you are already registered and no registration card is
  711.               necessary.
  712.  
  713.               Once you are a registered 4DOS user, you will receive:
  714.  
  715.                    *  A subscription to The Prompt Solution, JP Software's
  716.                       publication for 4DOS users and other customers.  The
  717.                       Prompt Solution includes tips for using 4DOS,
  718.                       notification of upgrades, and information about 4DOS
  719.                       enhancements and other products from JP Software.
  720.  
  721.                    *  Technical support via electronic mail, fax, mail, or
  722.                       telephone.
  723.  
  724.  
  725.  
  726.  
  727.           ___________________________________________________________________
  728.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  5
  729.  
  730.                                                                  INTRODUCTION
  731.           ___________________________________________________________________
  732.  
  733.  
  734.  
  735.                    *  A free or low-cost upgrade to the next version of 4DOS;
  736.                       see below for details.
  737.  
  738.               4DOS is upgraded regularly through maintenance releases,
  739.               designed to fix minor problems or improve compatibility, and
  740.               major upgrades which contain enhancements and additional
  741.               features.  Maintenance releases are identified by a change in
  742.               the hundredths digit of the version number, for example from
  743.               4.0 to 4.01 or 4.02.  New versions are identified by a change
  744.               in the tenths digit or "ones" digit, for example from 4.0 to
  745.               4.1 or 5.0.
  746.  
  747.               As a registered user you will automatically be notified when a
  748.               major upgrade of 4DOS is released.  The first major upgrade
  749.               released after your initial purchase of 4DOS can be obtained
  750.               at no charge if you download it from one of our support areas
  751.               (see below).  A new manual will be available for download from
  752.               the same sources.  If you do not have a modem or prefer to
  753.               obtain the new version on diskette, there is a minimal
  754.               processing charge; there is also a charge for a new printed
  755.               manual.  After you've received this first free or low-cost
  756.               upgrade, there will be a standard upgrade charge to get
  757.               additional major upgrades as they are released.
  758.  
  759.               We don't send out notices when maintenance releases become
  760.               available, because you don't usually need them unless you're
  761.               having a problem.  However, you can download maintenance
  762.               releases from our support areas (see below), or order them on
  763.               disk at a nominal cost.  If you call with a problem that's
  764.               been addressed in a maintenance release, we'll mail you a copy
  765.               on disk or assist you in downloading it.  Downloading a
  766.               maintenance release or obtaining it on disk from JP Software
  767.               is separate from and does not affect your eligibility for a
  768.               free or low-cost upgrade to the next major upgrade of 4DOS.
  769.  
  770.               As a registered user, you can download maintenance releases
  771.               and your free or low-cost 4DOS upgrade from the JP Software
  772.               support area on CompuServe (GO PCVENB, library 10), Bix
  773.               (ibm.vendors/listings), or Channel 1 (see below).  The file
  774.               name(s) used for 4DOS updates vary from time to time depending
  775.               on the extent of the changes made, but typically will look
  776.               like 4DOS4*.ZIP.  The "*" refers to one or more characters
  777.               further identifying the file.  Check the directory listings
  778.               and file descriptions on the service you are using to identify
  779.               the files you need.  Downloads are also available from many
  780.               other local bulletin boards and online services.  Lists of
  781.               download locations, including bulletin boards outside the USA,
  782.  
  783.  
  784.           ___________________________________________________________________
  785.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  6
  786.  
  787.                                                                  INTRODUCTION
  788.           ___________________________________________________________________
  789.  
  790.  
  791.               are published from time to time in The Prompt Solution and are
  792.               included in the SUPPORT.BBS file that comes with 4DOS.
  793.  
  794.               We offer BBS support through Channel 1 in Boston, one of the
  795.               largest and best-run bulletin boards in the US.  Channel 1 is
  796.               an independent bulletin board and is not owned or operated by
  797.               JP Software.  To access Channel 1 set your modem to 2400 baud,
  798.               no parity, 8 data bits, and 1 stop bit, and dial 617-354-8873
  799.               (if you have a high-speed modem, additional numbers are
  800.               available once you are online).  Join conference 5 for 4DOS
  801.               downloads.  You can leave 4DOS support messages and download
  802.               4DOS files at no charge, but if you want to use any of Channel
  803.               1's other excellent services you may need to purchase a
  804.               membership to have sufficient online time.
  805.  
  806.  
  807.           Technical Support
  808.  
  809.               Technical support for 4DOS is available to all users.  When
  810.               you contact us for support please give us your 4DOS serial
  811.               number so that we can verify your status as a customer, keep
  812.               track of your inquiry properly, and contact you if necessary.
  813.  
  814.               Often the best way to contact us for support is by modem in
  815.               one of the following public 4DOS support conferences.  The
  816.               numbers in parentheses indicate the usual delay, in days, to
  817.               receive a reply to a message.
  818.  
  819.               CompuServe / ZiffNet:  Primary support is via the JP Software
  820.               section of the CompuServe PCVENB forum (GO PCVENB, section 10)
  821.               (1 day).  We monitor other CompuServe and ZiffNet forums, but
  822.               response may vary depending on our workload.
  823.  
  824.               Bulletin Boards:  Primary support is via the Channel 1 BBS,
  825.               Boston, MA (1 - 3 days; see above for access details).
  826.               Messages may be left in any of the 4DOS conferences; check the
  827.               online list for exact conference numbers, which may change.
  828.               Additional support is available from many local BBSes via the
  829.               4DOS conferences on the InterLink, RIME (PC Relay), SmartNet,
  830.               and FidoNet BBS Networks (3-5 days).
  831.  
  832.               BIX:  Support is available via the ibm.vendors conference,
  833.               topic 4DOS (3-5 days).
  834.  
  835.               In addition, you can contact JP Software for support by mail,
  836.               telephone, fax, or electronic mail.  Addresses and phone
  837.               numbers are listed on page vi of this manual.
  838.  
  839.  
  840.  
  841.           ___________________________________________________________________
  842.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  7
  843.  
  844.                                                                  INTRODUCTION
  845.           ___________________________________________________________________
  846.  
  847.  
  848.  
  849.               Our goal is to return all telephone messages within 24 hours
  850.               (weekends and holidays excluded).  If your problem is urgent
  851.               and requires a faster response, please let us know and we will
  852.               try to accommodate you.  If you contact us by telephone and
  853.               don't receive a reply within 24 hours, please try again.  We
  854.               may have tried to return your call and been unable to reach
  855.               you.
  856.  
  857.               Before contacting us for support, please check if the manual
  858.               or other documentation answers your question.  If you can't
  859.               find what you need, try Chapter 4 / General Concepts (page
  860.               41), and the Index.  If you're having trouble getting 4DOS to
  861.               run properly, either alone or with your particular hardware or
  862.               software, see Chapter 7 / Using 4DOS with Your Hardware and
  863.               Software, on page 143, and the APPNOTES.DOC file on your 4DOS
  864.               disk.  Also look through the README.DOC and UPDATE.DOC files
  865.               that came with 4DOS, as they may contain updates to this
  866.               manual or other important information.
  867.  
  868.               If you do need to contact us for support, it helps if you can
  869.               give us some basic information:
  870.  
  871.                    *  What exactly did you do?  A concise description of what
  872.                       steps you must take to make the problem appear is much
  873.                       more useful than a long analysis of what might be
  874.                       happening.
  875.  
  876.                    *  What went wrong?  At what point did the failure occur?
  877.                       If you saw an error message or other important or
  878.                       unusual information on the screen, what exactly did it
  879.                       say?
  880.  
  881.                    *  Briefly, what techniques did you use to try to resolve
  882.                       the problem?  What results did you get?
  883.  
  884.                    *  What are the contents of your CONFIG.SYS, AUTOEXEC.BAT,
  885.                       4START, 4EXIT, and 4DOS.INI files, any batch files they
  886.                       call, and any alias or environment variable files they
  887.                       load?
  888.  
  889.                    *  Can you repeat the problem or does it occur randomly?
  890.                       If it's random, are there any clues as to what programs
  891.                       you're using when the problem occurs?
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.           ___________________________________________________________________
  899.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  8
  900.  
  901.                                                     CHAPTER 1 / 4DOS FEATURES
  902.           ___________________________________________________________________
  903.  
  904.  
  905.  
  906.           CHAPTER 1 / 4DOS FEATURES
  907.  
  908.  
  909.           4DOS is a complete computing environment that works with all
  910.           versions of MS-DOS and PC-DOS from 2.0 to 5; with DR-DOS 3.4, 5.0,
  911.           and above; and in OS/2 DOS sessions.  It is compatible with
  912.           virtually all application programs, with Microsoft Windows, and
  913.           with task switching programs like DESQview and Back & Forth.
  914.  
  915.           4DOS replaces the traditional DOS user interface with a more
  916.           modern, friendlier, and more powerful one.  4DOS is completely
  917.           compatible with traditional DOS commands, and adds dozens of new
  918.           features that aren't available with any version of DOS.
  919.  
  920.  
  921.               Minimal Memory Usage
  922.  
  923.               4DOS can take advantage of extended memory, expanded memory,
  924.               and memory managers for 386, 486, and some 80286 and 8086/88
  925.               computers that let programs "load high."  If you load both
  926.               4DOS and the environment "high," 4DOS will use only 256 bytes
  927.               of base memory, less than any version of the traditional DOS
  928.               command processor, COMMAND.COM.  (See page 128.)
  929.  
  930.  
  931.               Online Help
  932.  
  933.               4DOS has complete, full-screen, context-sensitive help for all
  934.               of its commands and all DOS utilities.  The F1 key pops up the
  935.               help system at any time from the 4DOS prompt.  The help system
  936.               is cross-referenced and includes examples.  (See page 63.)
  937.  
  938.  
  939.               Directory Navigation
  940.  
  941.               4DOS's enhanced CD command lets you specify where to look for
  942.               subdirectories you're changing to.  CDD lets you switch drives
  943.               and directories simultaneously, and the new automatic
  944.               directory change feature changes directories for you when you
  945.               type a directory name at the command line.
  946.  
  947.  
  948.               Faster and Better Batch Files
  949.  
  950.               4DOS speeds up traditional DOS batch files, and introduces a
  951.               new kind of batch file processing that is 5 to 10 times faster
  952.               than traditional batch files as well.  (See page 100.)
  953.  
  954.  
  955.           ___________________________________________________________________
  956.           Copyright 1992, JP Software Inc.        4DOS Reference Manual  /  9
  957.  
  958.                                                     CHAPTER 1 / 4DOS FEATURES
  959.           ___________________________________________________________________
  960.  
  961.  
  962.  
  963.               In addition, 4DOS has more than two dozen new batch file
  964.               commands, and many other enhancements that will make your
  965.               batch files easier to write and far more powerful.
  966.  
  967.  
  968.               Command Line Enhancements
  969.  
  970.               4DOS replaces the traditional command line with a much
  971.               friendlier and more powerful command line environment.  Among
  972.               the features which 4DOS offers are:
  973.  
  974.                    Command Line Editing:  You can use the cursor keys to
  975.                    make corrections, in the same way that you would with a
  976.                    text editor.   (See page 55.)
  977.  
  978.                    Command History and Recall:  4DOS keeps track of each
  979.                    command you type.  You can recall any command and issue
  980.                    it again, or edit it to create a slightly different
  981.                    command.   Commands can be recalled one at a time, or you
  982.                    can pop up a window of recently entered commands and
  983.                    choose the one you want.  (See page 56.)
  984.  
  985.                    Automatic Filename Expansion:  If you type part of a
  986.                    filename, with or without wildcards, 4DOS will fill in
  987.                    the complete filename for you at the touch of a key.
  988.                    (See page 59.)
  989.  
  990.                    Multiple Commands on a Single Line:  You can type a
  991.                    series of commands on a single line instead of waiting
  992.                    for each one to finish before you issue the next one.
  993.                    (See page 61.)
  994.  
  995.                    Multiple Filenames:  Most 4DOS commands can operate on
  996.                    multiple files at once.  For example, you can copy
  997.                    several files at once from your hard drive to drive A
  998.                    with a command like:
  999.  
  1000.                         copy *.wks *.dat *.txt  a:\
  1001.  
  1002.                    Point-and-Shoot File Selection:  The SELECT command lets
  1003.                    you choose files with the cursor keys instead of
  1004.                    remembering their names.  It gives you a full "point-and-
  1005.                    shoot" environment for other 4DOS commands.   (See page
  1006.                    293.)
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.           ___________________________________________________________________
  1013.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  10
  1014.  
  1015.                                                     CHAPTER 1 / 4DOS FEATURES
  1016.           ___________________________________________________________________
  1017.  
  1018.  
  1019.  
  1020.  
  1021.               Aliases
  1022.  
  1023.               An alias is a command you create, assigned to a name you
  1024.               select or to a key combination of your choosing.  You can use
  1025.               aliases to rename commands, to set command defaults, and to
  1026.               create new commands that are a combination of other commands.
  1027.               When aliases are combined with the 4DOS multiple command
  1028.               feature, they act like very fast batch files.   (See pages 97
  1029.               and 174.)
  1030.  
  1031.  
  1032.               File Descriptions
  1033.  
  1034.               4DOS lets you assign a description (up to 40 characters long)
  1035.               to each of your files and directories.  The descriptions are
  1036.               displayed with the DIR and SELECT commands, and move with
  1037.               their files when you use a COPY, DEL, MOVE, or RENAME command.
  1038.               (See page 209.)
  1039.  
  1040.  
  1041.               Executable Extensions
  1042.  
  1043.               Executable extensions let you associate a file extension with
  1044.               the program that processes files of that type.  For example,
  1045.               you could associate .BAS files with the BASIC interpreter, or
  1046.               .DBF files with dBase or Foxbase.  4DOS runs the appropriate
  1047.               program automatically whenever you type the name of a file
  1048.               that has an extension you have defined as executable.  (See
  1049.               page 76.)
  1050.  
  1051.  
  1052.               Compatibility
  1053.  
  1054.               You can use 4DOS:
  1055.  
  1056.                    *  with all monochrome, CGA, EGA, and VGA video systems,
  1057.                       with any number of screen rows and columns.
  1058.  
  1059.                    *  with DOS-compatible networks, including Novell Netware,
  1060.                       3Com 3+, Banyan Vines, and Artisoft LANTastic.
  1061.  
  1062.                    *  with all popular memory managers and task switchers.
  1063.  
  1064.                    *  with virtually all commercial applications, utility
  1065.                       programs, and memory-resident utilities (TSRs).
  1066.  
  1067.  
  1068.  
  1069.           ___________________________________________________________________
  1070.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  11
  1071.  
  1072.                                                     CHAPTER 1 / 4DOS FEATURES
  1073.           ___________________________________________________________________
  1074.  
  1075.  
  1076.  
  1077.  
  1078.               New Commands and Options
  1079.  
  1080.               4DOS includes over 80 commands.  A few are the same as
  1081.               traditional commands.  Many are compatible with traditional
  1082.               commands but are enhanced with several additional options.
  1083.               The majority are unique to 4DOS.  If you have always wished
  1084.               that DOS had a command to help in a special situation, you
  1085.               will probably find that command in 4DOS.  A complete list of
  1086.               4DOS commands and options, along with explanations of how to
  1087.               use them, begins on page 167.
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.           ___________________________________________________________________
  1127.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  12
  1128.  
  1129.                                                      CHAPTER 2 / INSTALLATION
  1130.           ___________________________________________________________________
  1131.  
  1132.  
  1133.  
  1134.           CHAPTER 2 / INSTALLATION
  1135.  
  1136.  
  1137.           Before you install 4DOS (or any other software, for that matter),
  1138.           you should make a bootable system diskette so you can recover in
  1139.           case of a power failure or other interruption during the
  1140.           installation process.  To do so, put a fresh diskette in drive A
  1141.           and then type:
  1142.  
  1143.                    format a: /s
  1144.  
  1145.           The FORMAT command will take a few minutes to prepare the floppy
  1146.           diskette and then will copy your system files to drive A.  Once the
  1147.           process is complete, you should test your bootable floppy by
  1148.           leaving it in drive A and simultaneously pressing the Ctrl, Alt,
  1149.           and Del keys to make sure your system will boot up properly.  Once
  1150.           that's done, put the floppy away in a safe place and reboot your
  1151.           computer normally.
  1152.  
  1153.           The text below describes both automated and manual installation
  1154.           methods.  If you have a diskette copy of 4DOS, you can use either
  1155.           method.  If you have a downloaded copy, you must use manual
  1156.           installation.  If you are updating from a previous version of 4DOS,
  1157.           be sure to look through the update instructions for the new version
  1158.           in the README.DOC file.
  1159.  
  1160.  
  1161.           Automated Installation
  1162.  
  1163.               Now you are ready to install 4DOS.  Put the distribution
  1164.               diskette into your first disk drive, drive A. (You can use
  1165.               drive B if you prefer.)  Then log onto drive A by typing:
  1166.  
  1167.                    a:
  1168.  
  1169.               and press the Enter key.  One of the files on the distribution
  1170.               diskette, README.1ST, contains information that you should
  1171.               read before you install 4DOS on your computer.  Type:
  1172.  
  1173.                    type readme.1st
  1174.  
  1175.               to view the file.  If you want to print a copy of the file,
  1176.               type:
  1177.  
  1178.                    copy readme.1st prn
  1179.  
  1180.               Now you can start the installation process.  Type:
  1181.  
  1182.  
  1183.           ___________________________________________________________________
  1184.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  13
  1185.  
  1186.                                                      CHAPTER 2 / INSTALLATION
  1187.           ___________________________________________________________________
  1188.  
  1189.  
  1190.  
  1191.                    install
  1192.  
  1193.               and press the Enter key.  If you are using a color video
  1194.               adapter with a monochrome monitor (for example, a laptop
  1195.               computer with a monochrome EGA display), type:
  1196.  
  1197.                    install /m
  1198.  
  1199.               Once the installation program has started, just follow the
  1200.               instructions on the screen and 4DOS will install itself on
  1201.               your system.
  1202.  
  1203.               The installation program will ask whether you want to perform
  1204.               a complete installation, a partial installation in order to
  1205.               run the 4DOS Tour, or whether you want to retrieve specific
  1206.               files from the 4DOS library.  Choose the full installation to
  1207.               put all of 4DOS on your system, or the Tour option if you want
  1208.               to see what 4DOS can do before you install it permanently.
  1209.               The installation program will not make any changes to your
  1210.               CONFIG.SYS or AUTOEXEC.BAT files unless you give it permission
  1211.               to do so.
  1212.  
  1213.               If you elect to perform a full installation, reboot your
  1214.               computer when the installation program is done.  You will then
  1215.               have all the power of 4DOS available to you.
  1216.  
  1217.               We know some users feel unsure about running automated
  1218.               installation programs on their computers.  4DOS's automated
  1219.               installation is carefully written to be very well-behaved.  It
  1220.               won't modify or erase any existing files without asking you,
  1221.               and it takes a very straightforward, step by step approach.
  1222.  
  1223.               You can halt the installation process at any time and return
  1224.               to the DOS prompt by pressing Ctrl-X (hold down the Ctrl key
  1225.               and then press "X").
  1226.  
  1227.  
  1228.           ## Manual Installation
  1229.  
  1230.               For diskette copies of 4DOS, the 4DOS files are contained in a
  1231.               special library file on the distribution diskette.  You cannot
  1232.               simply copy files from the diskette onto your system.  You
  1233.               must use the installation program to extract and decompress
  1234.               the 4DOS files if you want to perform a manual installation,
  1235.               or if you need to replace a damaged 4DOS file on your hard
  1236.               disk.
  1237.  
  1238.  
  1239.  
  1240.           ___________________________________________________________________
  1241.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  14
  1242.  
  1243.                                                      CHAPTER 2 / INSTALLATION
  1244.           ___________________________________________________________________
  1245.  
  1246.  
  1247.  
  1248.               If you want to install 4DOS manually from diskette, first
  1249.               start the automatic installation program using the
  1250.               instructions above.  Select the Extract all files option and
  1251.               extract the 4DOS files onto your hard disk or another floppy
  1252.               disk.  On a hard disk, place the files in their own directory.
  1253.               If you are upgrading from a previous version of 4DOS, use a
  1254.               new directory -- don't overwrite your existing files.
  1255.  
  1256.               To install 4DOS manually from a downloaded copy, follow the
  1257.               same procedure but extract the files using the appropriate
  1258.               decompression program for the file you have downloaded
  1259.               (usually this is PKUNZIP.EXE, since 4DOS files are usually
  1260.               distributed in ZIP format).
  1261.  
  1262.               Once you've extracted the files, you can go through the 4DOS
  1263.               Tour (see page 18) if you want to try 4DOS before completing
  1264.               the installation.  When you're ready to finish the
  1265.               installation process, all you need to do is add one line to
  1266.               your CONFIG.SYS file (before modifying CONFIG.SYS, be sure you
  1267.               have a bootable floppy disk as discussed above):
  1268.  
  1269.                    SHELL=D:\PATH\4DOS.COM D:\PATH /P
  1270.  
  1271.               "d:\path" means the drive and directory where your 4DOS files
  1272.               are stored.  The second "d:\path" on the SHELL= line sets the
  1273.               COMSPEC environment variable, and can be left out if 4DOS.COM
  1274.               is in the root directory of your boot drive.  Be sure to
  1275.               delete or REMark out any old SHELL= line for COMMAND.COM after
  1276.               you add the new SHELL= line for 4DOS.
  1277.  
  1278.               Next, add the following line to your AUTOEXEC.BAT file:
  1279.  
  1280.                    D:\PATH\KSTACK.COM
  1281.  
  1282.               where "d:\path" is the drive and directory where your 4DOS
  1283.               files are stored.
  1284.  
  1285.               Once you've finished modifying CONFIG.SYS and AUTOEXEC.BAT,
  1286.               reboot your system to start 4DOS.  For details on setting up
  1287.               the SHELL= line and AUTOEXEC.BAT, and on the 4DOS.INI file,
  1288.               which controls 4DOS configuration, see Chapter 6 / Options and
  1289.               Tuning (page 110).
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.           ___________________________________________________________________
  1298.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  15
  1299.  
  1300.                                                      CHAPTER 2 / INSTALLATION
  1301.           ___________________________________________________________________
  1302.  
  1303.  
  1304.  
  1305.  
  1306.           ## Uninstalling 4DOS
  1307.  
  1308.               In the extremely unlikely event that you have trouble booting
  1309.               your computer after you install 4DOS, you can also remove it
  1310.               quite easily.  We don't expect you to have any trouble, but we
  1311.               know some people feel more comfortable knowing how to
  1312.               uninstall a product as well as install it.  Or, you may need
  1313.               to remove 4DOS from one system if you are moving it to another
  1314.               system.
  1315.  
  1316.               To temporarily remove 4DOS from your system, first find the
  1317.               location of COMMAND.COM on your disk (for example, in the root
  1318.               directory, or the DOS directory).  Boot the system and use any
  1319.               standard editor to edit your CONFIG.SYS file (before modifying
  1320.               CONFIG.SYS be sure you have a bootable floppy disk as
  1321.               discussed above).  Look for a line which begins:
  1322.  
  1323.                    SHELL=D:\PATH\4DOS.COM ...
  1324.  
  1325.               ("d:\path" means a drive letter and directory name).  Insert
  1326.               the characters "REM " at the beginning of this line.  This
  1327.               converts it into "remarks" or comments.  (If you are using DOS
  1328.               3 or below, REMarks are not recognized in CONFIG.SYS, so the
  1329.               changed lines will produce a harmless "Unrecognized command"
  1330.               error when the system boots.)  Next, add a new line like this:
  1331.  
  1332.                    SHELL=D:\PATH\COMMAND.COM /P
  1333.  
  1334.               where "d:\path" is the proper drive and directory for
  1335.               COMMAND.COM.  If you were previously running COMMAND.COM with
  1336.               a /E:nnnn switch to set the size of your environment, you can
  1337.               add it to this line as well.
  1338.  
  1339.               After CONFIG.SYS has been modified, edit your AUTOEXEC.BAT
  1340.               file to remove any changes made to accommodate 4DOS.  Look for
  1341.               two commands:
  1342.  
  1343.                    SET COMSPEC=D:\PATH\4DOS.COM
  1344.                    D:\PATH\KSTACK.COM
  1345.  
  1346.               The first command will not be present on most systems.  If
  1347.               it's there, change it to read:
  1348.  
  1349.                    SET COMSPEC=D:\PATH\COMMAND.COM
  1350.  
  1351.  
  1352.  
  1353.  
  1354.           ___________________________________________________________________
  1355.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  16
  1356.  
  1357.                                                      CHAPTER 2 / INSTALLATION
  1358.           ___________________________________________________________________
  1359.  
  1360.  
  1361.  
  1362.               where "d:\path" is replaced by the correct drive and directory
  1363.               for COMMAND.COM.  The second command can be deleted, or you
  1364.               can place "REM " in front of it to convert it to a comment.
  1365.               The second command may be present without the "d:\path"
  1366.               portion or the ".COM" portion; the key thing to look for is
  1367.               "KSTACK".  If you wish, you can look for the PATH command, and
  1368.               remove the 4DOS directory from the directories listed there.
  1369.               However, there's probably no reason to do so unless you're
  1370.               permanently removing 4DOS from your system.
  1371.  
  1372.               Now reboot your system, and you should be back up and running
  1373.               under COMMAND.COM.  Correct the problem that gave you trouble
  1374.               with 4DOS (contact our technical support department if you
  1375.               need help, see page 7).  Once the problem is fixed, edit your
  1376.               CONFIG.SYS file again to remove the REMs on your 4DOS lines
  1377.               and put one on your COMMAND.COM line instead, restore any
  1378.               COMSPEC command in AUTOEXEC.BAT, and you can boot with 4DOS
  1379.               again.
  1380.  
  1381.               To completely remove 4DOS from your system, change CONFIG.SYS
  1382.               and AUTOEXEC.BAT as described above, then delete your 4DOS
  1383.               files.
  1384.  
  1385.               Again, we don't expect you to need to use the procedure above
  1386.               -- but we thought you should have it anyway, just in case it
  1387.               makes you feel a little more at ease about installing a new
  1388.               product on your computer.
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.           ___________________________________________________________________
  1412.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  17
  1413.  
  1414.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1415.           ___________________________________________________________________
  1416.  
  1417.  
  1418.  
  1419.           CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1420.  
  1421.  
  1422.           This chapter will acquaint you with some of the features of 4DOS.
  1423.           It isn't a substitute for the rest of the manual, but it will help
  1424.           you understand how familiar 4DOS seems if you are used to working
  1425.           at the traditional command prompt.  At the same time, it will
  1426.           introduce you to many of 4DOS's most popular features and
  1427.           enhancements.  By the time you finish working through this chapter,
  1428.           you will have a feeling for how easy and friendly 4DOS is compared
  1429.           to the traditional DOS command processor.
  1430.  
  1431.           This tour is designed to be used interactively.  Sit down at your
  1432.           computer with the manual.  Each time an example is shown, try it.
  1433.           The tour will create all of the files it uses;  it won't modify or
  1434.           change your existing files and subdirectories at all.  Each section
  1435.           of the tour is self-contained so you can skip any sections you wish
  1436.           and return to them later.
  1437.  
  1438.           If you come across terms or concepts in this chapter that you are
  1439.           unsure about, refer to Chapter 4 / General Concepts, the Glossary
  1440.           on page 351, or the Index.
  1441.  
  1442.  
  1443.           Starting The Tour
  1444.  
  1445.               Before you can start the tour, you need to install 4DOS.  If
  1446.               you haven't done so yet, see page 13 for instructions.  If you
  1447.               have a diskette copy of 4DOS, select "Tour Installation" from
  1448.               the INSTALL menu to copy the necessary 4DOS files to your disk
  1449.               without making any modifications to your CONFIG.SYS or
  1450.               AUTOEXEC.BAT files.  If you have already done a full
  1451.               installation and 4DOS is running on your system, just skip the
  1452.               step below that actually starts 4DOS (the step where the
  1453.               command "4DOS" is entered).
  1454.  
  1455.               During the course of the tour, we'll ask you to enter several
  1456.               commands.  The text that you should enter is always shown in
  1457.               bold type.  Your entries are shown here in lower case, but you
  1458.               can type in either upper or lower case.
  1459.  
  1460.               The computer's prompts and responses are displayed in normal,
  1461.               non-bold type.  The display may look slightly different on
  1462.               your system, depending on how your prompt is set up, what disk
  1463.               drive you're using, and what files are in your 4DOS directory.
  1464.               Don't worry about any minor differences.
  1465.  
  1466.  
  1467.  
  1468.           ___________________________________________________________________
  1469.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  18
  1470.  
  1471.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1472.           ___________________________________________________________________
  1473.  
  1474.  
  1475.  
  1476.               In some cases, the computer's output will be too long to fit
  1477.               on a line of this manual and remain readable.  We've truncated
  1478.               those lines and placed three dots [...] at the end to show you
  1479.               that the actual line displayed on your screen will be a little
  1480.               longer.  Some commands create more lines of output than we
  1481.               need to display here to show how they work.  We've put a line
  1482.               of nine dots [... ... ...] in those locations to indicate that
  1483.               additional information will be shown on your screen.
  1484.  
  1485.               To start the tour, first change to the directory where 4DOS
  1486.               was installed, using the CD command.  For example, if you've
  1487.               installed 4DOS in the directory C:\4DOS, enter the following
  1488.               command:
  1489.  
  1490.                    C:\> cd 4dos
  1491.                    C:\4DOS>
  1492.  
  1493.               Now start 4DOS by typing:
  1494.  
  1495.                    C:\4DOS> 4dos
  1496.  
  1497.               You'll see a sign-on message from 4DOS that looks similar to
  1498.               this:
  1499.  
  1500.                    4DOS EMS swapping initialized (96K)
  1501.                    4DOS 4.0   DOS 5.0
  1502.                    Copyright 1988-1992  Rex Conn & JP Software Inc.  ...
  1503.                    Registered for use on a single computer.
  1504.  
  1505.               and then a prompt like this:
  1506.  
  1507.                    c:\4dos>
  1508.  
  1509.               Depending on how your prompt was previously defined, you may
  1510.               see the 4DOS prompt in lower case, which many people find
  1511.               easier to read.  A lower case prompt is the 4DOS default, and
  1512.               we'll show the prompt that way throughout the tour.  Once you
  1513.               have 4DOS installed you can use the PROMPT command (see page
  1514.               278) to change the prompt to upper case if you prefer.
  1515.  
  1516.               If you want to exit from 4DOS at any time, just type the
  1517.               command EXIT at the 4DOS prompt and press Enter.  This will
  1518.               return you to the traditional DOS command line:
  1519.  
  1520.                    c:\4dos> exit
  1521.                    C:\4DOS>
  1522.  
  1523.  
  1524.  
  1525.           ___________________________________________________________________
  1526.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  19
  1527.  
  1528.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1529.           ___________________________________________________________________
  1530.  
  1531.  
  1532.  
  1533.  
  1534.           Basic Commands
  1535.  
  1536.               We'll begin the tour by demonstrating some of the most common,
  1537.               and most familiar, 4DOS commands.  We'll also show you some of
  1538.               the enhancements that 4DOS has added to those commands to make
  1539.               your computing easier.
  1540.  
  1541.               First, enter the single-character command ?.  You'll see a
  1542.               display like this:
  1543.  
  1544.                    c:\4dos> ?
  1545.                    ?           ALIAS       ATTRIB      BEEP        ...
  1546.                    CANCEL      CD          CDD         CHCP        ...
  1547.                    COLOR       COPY        CTTY        DATE        ...
  1548.                    DESCRIBE    DIR         DIRS        DRAWBOX     ...
  1549.                     ... ... ...
  1550.                    UNALIAS     UNSET       VER         VERIFY      ...
  1551.                    Y
  1552.  
  1553.               The ? command displays a list of all of 4DOS's commands.  You
  1554.               certainly don't have to memorize them all -- we'll show you
  1555.               how to get help with any command in a few moments.  Nor are we
  1556.               going to demonstrate all of these commands in this tour.  If
  1557.               you want complete information about a command, turn to the
  1558.               alphabetic Command Reference that begins on page 167.
  1559.  
  1560.               Now try a DIR command to see a list of files in the current
  1561.               directory.  DIR displays a list of file names, sizes, dates,
  1562.               and times:
  1563.  
  1564.                    c:\4dos> dir
  1565.  
  1566.                     Volume in drive C is JPS_TEST    Serial number is ...
  1567.                     Directory of  c:\4dos\*.*
  1568.  
  1569.                    .            <DIR>      8-22-91  14:21
  1570.                    ..           <DIR>      8-22-91  14:21
  1571.                    4dos.com        99280   8-26-91   4:00
  1572.                    4dos.doc       345005   8-26-91   4:00
  1573.                    4dos.ico          766   8-26-91   4:00
  1574.                    4dos.pif          545   8-26-91   4:00
  1575.                     ... ... ...
  1576.                    tour2.btm        2765   8-26-91   4:00
  1577.                    update40.doc    37946   8-26-91   4:00
  1578.                    vendor.doc       4434   8-26-91   4:00
  1579.                         833,056 bytes in 21 file(s)  851,968 bytes allocated
  1580.  
  1581.  
  1582.           ___________________________________________________________________
  1583.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  20
  1584.  
  1585.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1586.           ___________________________________________________________________
  1587.  
  1588.  
  1589.                      18,651,136 bytes free
  1590.  
  1591.               The 4DOS DIR display should look familiar.  But, unlike the
  1592.               traditional DIR display, 4DOS shows file names in lower case
  1593.               and in alphabetical order.  4DOS also gives you some totals at
  1594.               the end of the display that help you see how much space your
  1595.               files are using.
  1596.  
  1597.               By using some of DIR's options, you can make the display
  1598.               easier to read.  The directory display you just saw probably
  1599.               didn't fit on your screen.  You can tell DIR to pause at the
  1600.               end of each page by using the command DIR /P.  The /P is an
  1601.               example of a switch or option which modifies the behavior of a
  1602.               command:
  1603.  
  1604.                    c:\4dos> dir /p
  1605.  
  1606.                     Volume in drive C is JPS_TEST    Serial number is ...
  1607.                     Directory of  c:\4dos\*.*
  1608.  
  1609.                    .            <DIR>      8-22-91  14:21
  1610.                    ..           <DIR>      8-22-91  14:21
  1611.                    4dos.com        99280   8-26-91   4:00
  1612.                    4dos.doc       345005   8-26-91   4:00
  1613.                    4dos.ico          766   8-26-91   4:00
  1614.                    4dos.pif          545   8-26-91   4:00
  1615.                     ... ... ...
  1616.                    tour2.btm        2765   8-26-91   4:00
  1617.                    update40.doc    37946   8-26-91   4:00
  1618.                    Press any key when ready...
  1619.                    vendor.doc       4434   8-26-91   4:00
  1620.                         833,056 bytes in 21 file(s)  851,968 bytes allocated
  1621.                      18,649,088 bytes free
  1622.  
  1623.               You might prefer to display directories in 2 columns.  DIR
  1624.               will do that if you include the /2 option.  If you add the /V
  1625.               option, it will perform a vertical sort, with file names
  1626.               running alphabetically down the first column and then down the
  1627.               second column.  (We've left off the end of the second column
  1628.               of the display, since it doesn't fit on a manual page.  You'll
  1629.               be able to see it on the screen.)
  1630.  
  1631.                    c:\4dos> dir /2/v
  1632.  
  1633.                     Volume in drive C is JPS_TEST    Serial number is ...
  1634.                     Directory of  c:\4dos\*.*
  1635.  
  1636.                    .            <DIR>      8-22-91  14:21   helpcfg.exe  ...
  1637.  
  1638.  
  1639.           ___________________________________________________________________
  1640.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  21
  1641.  
  1642.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1643.           ___________________________________________________________________
  1644.  
  1645.  
  1646.                    ..           <DIR>      8-22-91  14:21   kstack.com   ...
  1647.                    4dos.com        99280   8-26-91   4:00   order.frm    ...
  1648.                    4dos.doc       345005   8-26-91   4:00   readme.doc   ...
  1649.                    4dos.ico          766   8-26-91   4:00   support.bbs  ...
  1650.                    4dos.pif          545   8-26-91   4:00   sysop.doc    ...
  1651.                    4dosm.ico         766   8-26-91   4:00   tour1.btm    ...
  1652.                    4help.exe       45632   8-26-91   4:00   tour2.btm    ...
  1653.                    aliases          8164   8-26-91   4:00   update40.doc ...
  1654.                    appnotes.doc    82722   8-26-91   4:00   vendor.doc   ...
  1655.                    4dos.hlp       120555   8-26-91   4:00
  1656.                         833,056 bytes in 21 file(s)  851,968 bytes allocated
  1657.                      18,653,184 bytes free
  1658.  
  1659.               DIR has many other formatting and file selection options.
  1660.               You'll use a few below; all of them are explained with the DIR
  1661.               command on page 211.
  1662.  
  1663.               Next, you'll use a simple batch file called TOUR1.BTM to
  1664.               create a dummy file.  (A .BTM batch file is similar to a
  1665.               traditional .BAT batch file but faster.  See page 100 for an
  1666.               explanation of the differences between the two.)  To run
  1667.               TOUR1.BTM, enter the command:
  1668.  
  1669.                    c:\4dos> tour1
  1670.  
  1671.               This batch file creates a small file called FILE1 in your
  1672.               current directory.  The contents of the file aren't important;
  1673.               we're simply using it to demonstrate some of 4DOS's file-
  1674.               handling capabilities.  You can verify that FILE1 has been
  1675.               created by using DIR again.
  1676.  
  1677.               Now use the COPY command to copy the contents of FILE1 to a
  1678.               new file, FILE2:
  1679.  
  1680.                    c:\4dos> copy file1 file2
  1681.                    c:\4dos\file1 => c:\4dos\file2
  1682.                         1 file(s) copied
  1683.  
  1684.               4DOS performed the copy just like the traditional COPY command
  1685.               does.  You may notice that the output is a little friendlier:
  1686.               COPY tells you exactly what file it copied and where it copied
  1687.               the file to, along with a count of files at the end.
  1688.  
  1689.               Now try renaming a file.  If you've used the traditional
  1690.               RENAME command or its synonym REN, this will look familiar:
  1691.  
  1692.                    c:\4dos> ren file1 file3
  1693.                    c:\4dos\file1 -> c:\4dos\file3
  1694.  
  1695.  
  1696.           ___________________________________________________________________
  1697.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  22
  1698.  
  1699.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1700.           ___________________________________________________________________
  1701.  
  1702.  
  1703.                         1 file(s) renamed
  1704.  
  1705.               Like COPY, the 4DOS REN command tells you just what it did.
  1706.               You now have two files, FILE2 and FILE3, in the current
  1707.               directory.  You can use one of 4DOS's enhancements to add the
  1708.               extension .TST to both of them:
  1709.  
  1710.                    c:\4dos> ren file2 file3 *.tst
  1711.                    c:\4dos\file2 -> c:\4dos\file2.tst
  1712.                    c:\4dos\file3 -> c:\4dos\file3.tst
  1713.                         2 file(s) renamed
  1714.  
  1715.               Unlike the traditional REN command, 4DOS lets you rename
  1716.               multiple files with a single command.  All of the 4DOS file
  1717.               processing commands like COPY, DEL, MOVE, and RENAME accept
  1718.               multiple file names, so you can do in one command what used to
  1719.               require a separate command for each file.
  1720.  
  1721.               Now delete the files you have just created.  You could use a
  1722.               simple command like DEL *.TST, but that would delete any other
  1723.               .TST files in the current directory also.  To protect against
  1724.               erasing files that you might want to keep, add a /P option to
  1725.               DEL so that it will prompt you before it deletes each file.
  1726.               Answer Y to the prompts shown below to let 4DOS delete your
  1727.               test files:
  1728.  
  1729.                    c:\4dos> del *.tst /p
  1730.                    Delete c:\4dos\file3.tst (Y/N)? y
  1731.                    Delete c:\4dos\file2.tst (Y/N)? y
  1732.                         2 file(s) deleted
  1733.  
  1734.               To verify all these actions, you can do a DIR or DIR /P to
  1735.               look at what files are left in the directory.  All the files
  1736.               you've just created (FILE1, FILE2, FILE3, etc.) should be
  1737.               gone.
  1738.  
  1739.               The features we've demonstrated here -- traditional commands
  1740.               with enhancements that make your work easier -- are present
  1741.               throughout 4DOS.  If you want more details, pick a DOS command
  1742.               that you're familiar with and look up the corresponding 4DOS
  1743.               command in the reference section to get an idea of what's new
  1744.               and improved in 4DOS.  (Remember that 4DOS only replaces
  1745.               internal commands like COPY and DIR, not external commands
  1746.               like DISKCOPY and FORMAT.)
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.           ___________________________________________________________________
  1754.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  23
  1755.  
  1756.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1757.           ___________________________________________________________________
  1758.  
  1759.  
  1760.  
  1761.  
  1762.           Command Line Editing and History
  1763.  
  1764.               This section demonstrates 4DOS features which make it easy to
  1765.               correct typing mistakes at the DOS prompt, to repeat previous
  1766.               commands, and to get help with any command.
  1767.  
  1768.               We can't show you exact examples here as easily as we can in
  1769.               the other sections of the tour, since the display depends on
  1770.               the exact keystrokes you type and we want you to experiment a
  1771.               little.  So we'll guide you through what 4DOS can do, and
  1772.               you'll see the results on your screen.
  1773.  
  1774.               First, create a typing error by mistake.  Enter an incorrect
  1775.               DIR command:
  1776.  
  1777.                    c:\4dos> dur /2
  1778.  
  1779.               Traditionally, you would have had to use the Backspace key to
  1780.               erase most of the line in order to correct this error, or
  1781.               press Esc and start over.  4DOS makes corrections much easier.
  1782.               Press the Home key followed by the right arrow.  The cursor
  1783.               will move to the start of the line and then right one space to
  1784.               the "u" in "dur".  Type an "i" and the command should be
  1785.               correct.  To execute it, press Enter;  if you'd rather not,
  1786.               press Esc.
  1787.  
  1788.               That's a simple example of 4DOS's command line editing.  You
  1789.               can use the left and right arrow keys, Home and End, and
  1790.               Backspace and Del to move around and modify your command line
  1791.               at any time, just like you do in your word processor or
  1792.               editor.  Other keys let you move the cursor a word at a time,
  1793.               delete words, change between overstrike and insert modes, and
  1794.               perform many other operations.  Esc always clears the line and
  1795.               lets you start over.  For a summary of all the command line
  1796.               editing keys see page 55, or your 4DOS Quick Reference card.
  1797.  
  1798.               4DOS also remembers the commands you type in a command
  1799.               history.  To see the commands you have used so far during this
  1800.               tour, we'll use the 4DOS HISTORY command to display the entire
  1801.               history list:
  1802.  
  1803.                    c:\4dos> history
  1804.                    ?
  1805.                    dir
  1806.                    dir /p
  1807.                    dir /2/v
  1808.  
  1809.  
  1810.           ___________________________________________________________________
  1811.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  24
  1812.  
  1813.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1814.           ___________________________________________________________________
  1815.  
  1816.  
  1817.                    tour1
  1818.                    ren file1 file3
  1819.                    ren file2 file3 *.tst
  1820.                    del *.tst /p
  1821.                    dir /2
  1822.  
  1823.               4DOS records about 1000 characters of history.  You can reduce
  1824.               or enlarge this amount to suit your own needs.
  1825.  
  1826.               Now press the up-arrow key once.  The last command in the
  1827.               HISTORY display (DIR /2 in the example above) will appear at
  1828.               the prompt.  You can use the editing keys to modify this
  1829.               command, which is much easier than retyping it.  To execute
  1830.               the command again, in either its modified or unmodified form,
  1831.               press Enter.  To clear the line, press Esc.
  1832.  
  1833.               If you'd like to see more commands, first press Esc to clear
  1834.               the command line. (To see all commands in the history, you
  1835.               should always start with an empty command line.)  Now press
  1836.               up-arrow several times.  Each time you press it, 4DOS will
  1837.               back up one more line in the command history.  Once you find
  1838.               the line you're looking for, you can modify it if you like and
  1839.               then press Enter to execute it.
  1840.  
  1841.               Now imagine that you have been working for a while.  An hour
  1842.               ago you did a complex DIR command and you need to do it again.
  1843.               You could scroll through an hour's worth of command history.
  1844.               But another 4DOS feature called command completion will save
  1845.               you time.
  1846.  
  1847.               First, type the beginning of the command -- DI, or DIR.  Now
  1848.               press the up-arrow.  4DOS will recall the newest command in
  1849.               the history that starts with the characters you typed (if
  1850.               there are no matches, 4DOS beeps).  Press up-arrow again to
  1851.               retrieve the command before that, still matching to the
  1852.               characters you originally typed.
  1853.  
  1854.               You can test this out easily using DI or DIR, because you've
  1855.               put several DIR commands into the command history during the
  1856.               tour.
  1857.  
  1858.               Perhaps you would prefer to look at a list of commands that
  1859.               you have entered and choose from the list.  First press the
  1860.               Esc key to clear the command prompt.  Then press the PgUp key.
  1861.               4DOS will display a history window in the upper right corner
  1862.               of your screen showing the commands you've recently typed.
  1863.               You can move around in this window with the up-arrow and down-
  1864.               arrow keys.  PgUp and PgDn move the display a page at a time.
  1865.  
  1866.  
  1867.           ___________________________________________________________________
  1868.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  25
  1869.  
  1870.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1871.           ___________________________________________________________________
  1872.  
  1873.  
  1874.               When you find the command you want, press Enter to re-execute
  1875.               it as is, or press Ctrl-Enter to move the line down to the
  1876.               prompt where you can edit it as usual.
  1877.  
  1878.               You can find more information on command line editing and
  1879.               history beginning on pages 55 and 56.  And you can use
  1880.               directives in your 4DOS.INI file (see page 119) to set the
  1881.               length of the history list and the size of the history window,
  1882.               and to redefine the editing and history keys.
  1883.  
  1884.               You can also get help any time you need it from the 4DOS
  1885.               command prompt.  Just press the F1 key.  You'll see a display
  1886.               of all of 4DOS's HELP topics.  If you would like some help
  1887.               with COPY, move the cursor bar to COPY, or just type COPY and
  1888.               4DOS will move the bar for you.  Press Enter to see help on
  1889.               the topic;  once you're there, scroll through the help using
  1890.               the vertical arrows or PgUp and PgDn keys.  The highlighted
  1891.               items within a topic are cross-references to other topics;
  1892.               select one with the horizontal arrow keys and press Enter to
  1893.               view it.  Press Esc or F1 to return to the topic list.
  1894.  
  1895.               For more help using the Help display, select the topic -HELP-
  1896.               from the topic list.  If you have a mouse, also see the -HELP-
  1897.               topic for information on using the mouse within the Help
  1898.               system.
  1899.  
  1900.               Now exit the help system (use Esc) and start entering a
  1901.               command:
  1902.  
  1903.                    c:\4dos> copy *.doc a: /
  1904.  
  1905.               After that "/" you want to use the option that tells COPY to
  1906.               prompt you before replacing an existing file, but you can't
  1907.               remember what it is.  Just leave the command as it is and
  1908.               press F1.  4DOS will display help on the command you're
  1909.               entering, and you'll see that the option you want is /R.
  1910.               Press Esc to exit help and you'll be right back on the command
  1911.               line.  You can type the R and press Enter to execute your
  1912.               command, or press Esc instead to clear the line if you don't
  1913.               really want to execute the command.
  1914.  
  1915.               4DOS has may more features that can help you at the command
  1916.               line.  Most of them are described in Chapter 5 / Using 4DOS,
  1917.               in the section At the Command Line starting on page 54.
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.           ___________________________________________________________________
  1925.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  26
  1926.  
  1927.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1928.           ___________________________________________________________________
  1929.  
  1930.  
  1931.  
  1932.  
  1933.           More About Files
  1934.  
  1935.               This section of the tour lets you explore some more of 4DOS's
  1936.               features that will help you manage files and directories.
  1937.               You're about to use another batch file to create some files
  1938.               with which you can experiment.  The batch file you'll use is
  1939.               called TOUR2.BTM.  First, take a look at the batch file with
  1940.               the 4DOS LIST command:
  1941.  
  1942.                    c:\4dos> list tour2.btm
  1943.  
  1944.               As you can see on your screen, LIST is a full screen file
  1945.               viewer.  You can scroll and page through the text.  You may
  1946.               notice that some lines near the end of the file extend beyond
  1947.               the edge of your screen.  To make the off-screen text visible
  1948.               use the left and right arrows to scroll the display
  1949.               horizontally, or press W to turn line wrapping on and off.
  1950.               LIST also lets you search for text and print the file you're
  1951.               viewing, two capabilities that we won't demonstrate on this
  1952.               tour.  The file TOUR2.BTM is simply a batch file that creates
  1953.               other files, using 4DOS's ECHO command.  You don't have to
  1954.               worry about how it works; we just used it to show you LIST.
  1955.  
  1956.               Now run TOUR2.BTM:
  1957.  
  1958.                    c:\4dos> tour2
  1959.  
  1960.                    Please wait ...
  1961.  
  1962.                    File creation completed
  1963.  
  1964.               TOUR2 creates three files called FILE1, FILE2, and FILE3.  The
  1965.               contents of the files aren't important since we're just using
  1966.               them for demonstration purposes.  You'll be deleting and
  1967.               recreating them several times through the rest of the tour.
  1968.  
  1969.               Now try 4DOS's SELECT feature.  SELECT lets you choose files
  1970.               for any 4DOS command from a full-screen list.  We'll use it
  1971.               here to delete one of the files that TOUR2 created.  Enter the
  1972.               command:
  1973.  
  1974.                    c:\4dos> select del (file*)
  1975.  
  1976.               This command tells 4DOS to let you select from files that
  1977.               begin with the characters "file", and then pass the name of
  1978.               each file you select to the DEL command for action.
  1979.  
  1980.  
  1981.           ___________________________________________________________________
  1982.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  27
  1983.  
  1984.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1985.           ___________________________________________________________________
  1986.  
  1987.  
  1988.  
  1989.               The display on your screen should include a two-line header
  1990.               and then the list of files, just as they'd look in a directory
  1991.               display.  Press the spacebar to "mark" the first file -- a
  1992.               triangular mark will appear to the left of the file name.  You
  1993.               can scroll around in the display and mark and unmark files
  1994.               with the spacebar as you like.  When you hit Enter, the
  1995.               command will be executed, deleting the files you've marked.
  1996.               For now, mark FILE1 and leave the other files unmarked, so
  1997.               that FILE2 and FILE3 are not deleted.  You'll use them in the
  1998.               next step.
  1999.  
  2000.               SELECT is also handy if you want to copy a group of files to a
  2001.               floppy disk, perhaps to take your work home for the night or
  2002.               to make a quick backup.  If you'd like to try it, put a blank,
  2003.               formatted floppy disk in drive A.  Then enter this command:
  2004.  
  2005.                    c:\4dos> select copy (file*) a:
  2006.  
  2007.               Mark one or both of the files in the SELECT display, and the
  2008.               marked file(s) will be copied to the floppy disk when you hit
  2009.               Enter.
  2010.  
  2011.               SELECT is a "prefix" command:  it goes before another command
  2012.               and modifies what that second command does.  Another useful
  2013.               prefix command is EXCEPT,  which lets you do something except
  2014.               to one or more files.  Before you try EXCEPT, create new
  2015.               copies of FILE1, FILE2, and FILE3 (TOUR2 will overwrite any
  2016.               old copies of these files remaining from the last time it was
  2017.               run):
  2018.  
  2019.                    c:\4dos> tour2
  2020.  
  2021.                    Please wait ...
  2022.  
  2023.                    File creation completed
  2024.  
  2025.               Now use EXCEPT to delete all but one of the files that TOUR2
  2026.               created:
  2027.  
  2028.                    c:\4dos> except (file1) del file*
  2029.                    Deleting c:\4dos\file2
  2030.                    Deleting c:\4dos\file3
  2031.                         2 file(s) deleted
  2032.  
  2033.               The EXCEPT command protected FILE1 from being deleted.  To
  2034.               verify that, use the DIR command.  When you're done, run TOUR2
  2035.               one more time so the files are there for the next step.
  2036.  
  2037.  
  2038.           ___________________________________________________________________
  2039.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  28
  2040.  
  2041.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2042.           ___________________________________________________________________
  2043.  
  2044.  
  2045.  
  2046.               Next, create two subdirectories within the current directory:
  2047.  
  2048.                    c:\4dos> md dira dirb
  2049.  
  2050.               Notice that you can create both subdirectories with a single
  2051.               command.  Traditionally, you would have needed two MD commands
  2052.               to do the same thing.  To verify that the directories are
  2053.               there, use DIR but ask it to display only subdirectories and
  2054.               not files (if you're curious, /A:D stands for "Attributes:
  2055.               Directory";  see page 211 for more details):
  2056.  
  2057.                    c:\4dos> dir /a:d
  2058.  
  2059.                     Volume in drive C is JPS_TEST  Serial number is ...
  2060.                     Directory of  c:\4dos\*.*
  2061.  
  2062.                    .            <DIR>      8-22-91  14:21
  2063.                    ..           <DIR>      8-22-91  14:21
  2064.                    DIRA         <DIR>      8-27-91  10:23
  2065.                    DIRB         <DIR>      8-27-91  10:23
  2066.                               0 bytes in 4 file(s)         0 bytes allocated
  2067.                      18,608,128 bytes free
  2068.  
  2069.               OK, things look right.  Now move the demonstration files to
  2070.               those directories.  4DOS has a built-in MOVE command to move a
  2071.               file from one directory or drive to another, something DOS
  2072.               users have wished for for a long time.
  2073.  
  2074.               Here are the commands to move FILE1 to DIRA, and FILE2 and
  2075.               FILE3 to DIRB:
  2076.  
  2077.                    c:\4dos> move file1 dira
  2078.                    c:\4dos\file1 -> c:\4dos\dira\file1
  2079.                         1 file(s) moved
  2080.  
  2081.                    c:\4dos> move file2 file3 dirb
  2082.                    c:\4dos\file2 -> c:\4dos\dirb\file2
  2083.                    c:\4dos\file3 -> c:\4dos\dirb\file3
  2084.                         2 file(s) moved
  2085.  
  2086.               As usual, 4DOS tells you exactly what it's doing.
  2087.  
  2088.               Now that you've created a subdirectory structure, it's time to
  2089.               get a comprehensive look at it.  Use DIR to look for all the
  2090.               files whose names begin with "file" in the current directory
  2091.               and all of its subdirectories -- that's the DIR /S option:
  2092.  
  2093.  
  2094.  
  2095.           ___________________________________________________________________
  2096.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  29
  2097.  
  2098.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2099.           ___________________________________________________________________
  2100.  
  2101.  
  2102.  
  2103.                    c:\4dos> dir /s file*
  2104.  
  2105.                     Volume in drive C is JPS_TEST    Serial number is ...
  2106.                     Directory of  c:\4dos\dira\file*.*
  2107.  
  2108.                    file1              22   8-27-91  10:37
  2109.                              22 bytes in 1 file(s)     2,048 bytes allocated
  2110.                      18,587,648 bytes free
  2111.  
  2112.                        Total for:  c:\4dos\dira\file*.*
  2113.                              22 bytes in 1 file(s)     2,048 bytes allocated
  2114.  
  2115.                     Directory of  c:\4dos\dirb\file*.*
  2116.  
  2117.                    file2              22   8-27-91  10:37
  2118.                    file3            1938   8-27-91  10:37
  2119.                           1,960 bytes in 2 file(s)     4,096 bytes allocated
  2120.                      18,587,648 bytes free
  2121.  
  2122.                        Total for:  c:\4dos\dirb\file*.*
  2123.                           1,960 bytes in 2 file(s)     4,096 bytes allocated
  2124.  
  2125.                        Total for:  c:\4dos\file*.*
  2126.                           1,982 bytes in 3 file(s)     6,144 bytes allocated
  2127.  
  2128.               DIR has displayed the directory header, filenames, and totals
  2129.               for each of the two subdirectories that contain files matching
  2130.               the name you entered, FILE*.  It also has displayed a grand
  2131.               total.
  2132.  
  2133.               You've seen that DIR can look at several subdirectories at
  2134.               once.  Now do the same thing with DEL, and delete the files
  2135.               you put in your demonstration subdirectories, along with the
  2136.               subdirectories themselves, with a single command.  To do so,
  2137.               you need to use two options: /S and /X.  The first tells DEL
  2138.               to delete files in the current directory and all of its
  2139.               subdirectories.  The /X option makes DEL remove each
  2140.               subdirectory if all the files within it are deleted:
  2141.  
  2142.                    c:\4dos> del /s/x dira dirb
  2143.                    c:\4dos\dira\*.* : Are you sure (Y/N)? Y
  2144.                    Deleting c:\4dos\dira\file1
  2145.                    c:\4dos\dirb\*.* : Are you sure (Y/N)? Y
  2146.                    Deleting c:\4dos\dirb\file2
  2147.                    Deleting c:\4dos\dirb\file3
  2148.                         3 file(s) deleted
  2149.  
  2150.  
  2151.  
  2152.           ___________________________________________________________________
  2153.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  30
  2154.  
  2155.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2156.           ___________________________________________________________________
  2157.  
  2158.  
  2159.  
  2160.               Note the safety feature that 4DOS gave you here.  When you
  2161.               tell DEL to delete DIRA and DIRB, 4DOS recognizes them as
  2162.               directory names and assumes you mean "delete all files in this
  2163.               directory".  Since you're deleting all the files, 4DOS
  2164.               displays a prompt that tells you what's about to be deleted
  2165.               and asks you whether you really want to do the deletion.  Once
  2166.               you answer Y, the files are deleted and the subdirectory is
  2167.               automatically removed because you used the /X switch.
  2168.  
  2169.               4DOS also lets you use file descriptions, so you can describe
  2170.               a file's contents more clearly than with an 8-character file
  2171.               name.  The descriptions can be up to 40 characters long.
  2172.  
  2173.               First, run TOUR2 again to regenerate the three demonstration
  2174.               files.  Then enter a DESCRIBE command, along with a
  2175.               description for each file (you can enter any description you
  2176.               like; you don't have to use the text shown):
  2177.  
  2178.                    c:\4dos> tour2
  2179.                    c:\4dos> describe file*
  2180.                    Describe "c:\4dos\file1" : Tour file 1
  2181.                    Describe "c:\4dos\file2" : Tour file 2
  2182.                    Describe "c:\4dos\file3" : Tour file 3
  2183.  
  2184.               Now look at the descriptions with a DIR command:
  2185.  
  2186.                    c:\4dos> dir file*
  2187.  
  2188.                     Volume in drive C is JPS_TEST    Serial number is ...
  2189.                     Directory of  c:\4dos\file*.*
  2190.  
  2191.                    file1              22   8-27-91  10:48 Tour file 1
  2192.                    file2              22   8-27-91  10:48 Tour file 2
  2193.                    file3            1938   8-27-91  10:49 Tour file 3
  2194.                           1,982 bytes in 3 file(s)     6,144 bytes allocated
  2195.                      18,604,032 bytes free
  2196.  
  2197.               The descriptions will appear any time you ask for a standard,
  2198.               single-column directory display.  They will also appear when
  2199.               you use the SELECT command.  They can be a lifesaver when you
  2200.               have files whose contents you can't remember, or when you have
  2201.               large groups of files with similar names.
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.           ___________________________________________________________________
  2210.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  31
  2211.  
  2212.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2213.           ___________________________________________________________________
  2214.  
  2215.  
  2216.  
  2217.  
  2218.           Directory Navigation
  2219.  
  2220.               4DOS doesn't just make it easier to access files;  it also
  2221.               makes your life much easier when you're navigating through the
  2222.               hard disk directory structure.  You're probably already
  2223.               familiar with the traditional CD command, which you use to
  2224.               change directories.  4DOS adds a "go back" option to CD, which
  2225.               is invoked by using the minus sign [-] instead of a directory
  2226.               name.  Try this:
  2227.  
  2228.                    c:\4dos> cd \
  2229.                    c:\> cd -
  2230.                    c:\4dos>
  2231.  
  2232.               The CD - changes back to the directory you were in before the
  2233.               most recent CD command.  It's a convenient way to switch back
  2234.               and forth between two directories.
  2235.  
  2236.               4DOS also lets you change the drive and directory at the same
  2237.               time with the CDD command so you don't have to switch drives
  2238.               first and then change directories.  Here's an example using
  2239.               CDD.  Before you try it, put a floppy disk in drive A:
  2240.  
  2241.                    c:\4dos> cdd a:\
  2242.                    a:\> cdd -
  2243.                    c:\4dos>
  2244.  
  2245.               As you can see, the minus works with CDD as well.
  2246.  
  2247.               For more complex sequences of directory navigation, you can
  2248.               use PUSHD and POPD.  These commands maintain a directory
  2249.               "stack" and let you make several changes, then move back
  2250.               through the directories you've been to.  They can change both
  2251.               drive and directory, like CDD.  For example:
  2252.  
  2253.                    c:\4dos> pushd a:\
  2254.                    a:\> pushd c:\
  2255.                    c:\> popd
  2256.                    a:\> popd
  2257.                    c:\4dos>
  2258.  
  2259.               4DOS also offers you a special environment variable, CDPATH,
  2260.               to help you find the right directory without a lot of typing.
  2261.               CD, CDD, and PUSHD use CDPATH to find the directory you want
  2262.               to change to if they can't find it in the current directory.
  2263.               This can help a lot when you have long but commonly used
  2264.  
  2265.  
  2266.           ___________________________________________________________________
  2267.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  32
  2268.  
  2269.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2270.           ___________________________________________________________________
  2271.  
  2272.  
  2273.               directory names.  For example, say you have a directory called
  2274.               C:\DBASE\REPORTS which contains a subdirectory for each month
  2275.               of the year.  If you set CDPATH like this:
  2276.  
  2277.                    c:\4dos> set cdpath=c:\dbase\reports
  2278.  
  2279.               Then you can change to the JANUARY subdirectory like this:
  2280.  
  2281.                    c:\4dos> cd january
  2282.                    c:\dbase\reports\january> cd -
  2283.                    c:\4dos>
  2284.  
  2285.               CD found the JANUARY subdirectory, saving you from typing the
  2286.               entire name, because its parent directory was listed in
  2287.               CDPATH.  For more details about CDPATH see page 117.
  2288.  
  2289.  
  2290.           Aliases
  2291.  
  2292.               Aliases are one of 4DOS's most powerful features.  Simple
  2293.               aliases are very easy to set up and use (that's what we'll
  2294.               discuss here).  Complex aliases allow you to configure your
  2295.               system just about any way you want, and can take the place of
  2296.               many small batch files.
  2297.  
  2298.               The purpose of aliases is to rename or reconfigure 4DOS
  2299.               commands.  They are defined and viewed with the ALIAS command.
  2300.               In this tour, we'll show you how to set up aliases for the DIR
  2301.               command.  Of course, you can use aliases to enhance any
  2302.               command; for more examples see the ALIAS command on page 174,
  2303.               and the sample file ALIASES that comes with 4DOS.
  2304.  
  2305.               Here's a popular favorite for anyone who uses DIR and wants to
  2306.               be able to use a simple D instead:
  2307.  
  2308.                    c:\4dos> alias d = dir
  2309.  
  2310.               To see what aliases you've defined, enter ALIAS with no
  2311.               parameters:
  2312.  
  2313.                    c:\4dos> alias
  2314.                    d=dir
  2315.  
  2316.               To use the alias, just enter its name at the prompt, like any
  2317.               command:
  2318.  
  2319.                    c:\4dos> d
  2320.  
  2321.  
  2322.  
  2323.           ___________________________________________________________________
  2324.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  33
  2325.  
  2326.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2327.           ___________________________________________________________________
  2328.  
  2329.  
  2330.                     Volume in drive C is JPS_TEST    Serial number is ...
  2331.                     Directory of  c:\4dos\*.*
  2332.  
  2333.                    .            <DIR>      8-22-91  14:21
  2334.                    ..           <DIR>      8-22-91  14:21
  2335.                    4dos.com        99280   8-26-91   4:00
  2336.                    4dos.doc       345005   8-26-91   4:00
  2337.                    4dos.ico          766   8-26-91   4:00
  2338.                    4dos.pif          545   8-26-91   4:00
  2339.                     ... ... ...
  2340.                    tour2.btm        2765   8-26-91   4:00
  2341.                    update40.doc    37946   8-26-91   4:00
  2342.                    vendor.doc       4434   8-26-91   4:00
  2343.                         835,038 bytes in 24 file(s)  858,112 bytes allocated
  2344.                      18,599,936 bytes free
  2345.  
  2346.               Once you've defined an alias, you can use it anywhere a
  2347.               command can be used: at the command prompt, in a batch file,
  2348.               or inside another alias.
  2349.  
  2350.               As an example, build on the D alias you have already defined.
  2351.               Suppose you regularly use 4DOS's 2-column directory listings,
  2352.               discussed near the start of the tour.  Each time you want a
  2353.               directory listing, you use the command DIR /2.  Define an
  2354.               alias, D2, to let you execute this command with the touch of a
  2355.               couple of keys.  Since you have already defined D, you can
  2356.               define D2 in either of these ways (choose one to try):
  2357.  
  2358.                    c:\4dos> alias d2 = dir /2
  2359.                    c:\4dos> alias d2 = d /2
  2360.  
  2361.               If you want to see the results, just enter ALIAS again:
  2362.  
  2363.                    c:\4dos> alias
  2364.                    d=dir
  2365.                    d2=d /2
  2366.  
  2367.               To use this alias, just enter the command D2 and press Enter.
  2368.               You can pass file names to these aliases just like you would
  2369.               to the original command.  For example, D2 *.DOC will give you
  2370.               a 2-column display of the .DOC files.
  2371.  
  2372.               You can create aliases that are even easier to use with 4DOS's
  2373.               keystroke aliases.  These aliases let you assign an Alt or
  2374.               Function key to an alias so you can invoke it by pressing a
  2375.               single key.  Say you'd like to assign the 2-column directory
  2376.               display to F5.  Just define an alias like D2 above, and make
  2377.               the alias name the key name, with an at-sign [@] before it:
  2378.  
  2379.  
  2380.           ___________________________________________________________________
  2381.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  34
  2382.  
  2383.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2384.           ___________________________________________________________________
  2385.  
  2386.  
  2387.  
  2388.                    c:\4dos> alias @f5 = dir /2
  2389.  
  2390.               Now press F5 and the DIR /2 command will appear on the command
  2391.               line.  Press Enter to execute it, or type some additional
  2392.               arguments and then press Enter if you'd like.  (You can also
  2393.               make key aliases execute as soon as you press the key.  For
  2394.               details on how, see the ALIAS command on page 174.)
  2395.  
  2396.               You can use an alias to redefine how a standard command works,
  2397.               without changing its name.  Suppose you always want DIR to
  2398.               display its output in 2 columns, with a vertical sort and a
  2399.               pause at the end of each page.  You might think of using
  2400.               something like this:
  2401.  
  2402.                    c:\4dos> alias dir = dir /2/p/v
  2403.  
  2404.               Go ahead and try that, then do a DIR.  You'll get an error:
  2405.  
  2406.                    c:\4dos> dir
  2407.                    Alias loop
  2408.                    c:\4dos>
  2409.  
  2410.               The "alias loop" error is caused because 4DOS tries to
  2411.               reinterpret the DIR command inside your alias as another
  2412.               attempt to run the same alias.  It's easy to change the alias
  2413.               so this doesn't happen:
  2414.  
  2415.                    c:\4dos> alias dir = *dir /2/p/v
  2416.  
  2417.               The [*] tells 4DOS that what follows is not an alias.  Try the
  2418.               definition above (you can scroll back to the incorrect
  2419.               definition with up-arrow and modify it).  Then do a DIR and
  2420.               you'll see the results.  Using this method, you can redefine
  2421.               the default options for any 4DOS command.
  2422.  
  2423.               Aliases can contain multiple commands and can do much fancier
  2424.               things than what you've seen here.  They're great for creating
  2425.               shorthand names for commonly used programs like your word
  2426.               processor or database, and they will often help get programs
  2427.               loaded faster as well -- if you put the full name of the
  2428.               program in an alias, 4DOS doesn't have to search your PATH for
  2429.               it.
  2430.  
  2431.               For complete details, see the overview of aliases beginning on
  2432.               page 97, and the ALIAS command reference on page 174.
  2433.  
  2434.  
  2435.  
  2436.  
  2437.           ___________________________________________________________________
  2438.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  35
  2439.  
  2440.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2441.           ___________________________________________________________________
  2442.  
  2443.  
  2444.  
  2445.               When you read about aliases in the rest of the manual, you'll
  2446.               notice that most alias definitions are shown with back-quotes
  2447.               [`] around the part after the name.  Some aliases require
  2448.               these back-quotes when they are defined at the command line or
  2449.               in a batch file, to make it clear to 4DOS what is and isn't
  2450.               part of the alias.
  2451.  
  2452.               We show aliases that way elsewhere because it's the safest way
  2453.               to enter them at the command line.  If you always use the
  2454.               back-quotes, you don't have to worry about whether a
  2455.               particular alias needs them or not.  We didn't use them here
  2456.               because none of these aliases require back quotes and we
  2457.               didn't want to add extra typing during the tour.
  2458.  
  2459.  
  2460.           Other Commands
  2461.  
  2462.               There are a few other commands that we'll just touch on, so
  2463.               that you can see some of 4DOS's other capabilities.
  2464.  
  2465.               First, turn on the 4DOS LOG facility, which records all the
  2466.               commands you enter in a file.  Enter the command:
  2467.  
  2468.                    c:\4dos> log /w mylog
  2469.  
  2470.               You won't see anything else happen, but you've turned logging
  2471.               on.  We'll return to the 4DOS log later.
  2472.  
  2473.               4DOS has a couple of commands that let you control screen
  2474.               color.  The examples here will work on any system with a color
  2475.               video board (the commands work on monochrome systems, too, but
  2476.               you're restricted to the colors white and black).  Try
  2477.               clearing the screen to a specific color:
  2478.  
  2479.                    c:\4dos> cls bright white on magenta
  2480.  
  2481.               Now let's set a different color:
  2482.  
  2483.                    c:\4dos> color bright yellow on blue
  2484.  
  2485.               The behavior of the COLOR command varies, depending on whether
  2486.               you have an ANSI driver loaded.  If you don't, COLOR will
  2487.               change the color of the entire screen immediately.  If you do
  2488.               have an ANSI driver loaded, COLOR only affects the color of
  2489.               text displayed after it's executed, and not the color of text
  2490.               already on the screen.  If you don't know, don't worry about
  2491.               it -- just experiment with COLOR and see.
  2492.  
  2493.  
  2494.           ___________________________________________________________________
  2495.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  36
  2496.  
  2497.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2498.           ___________________________________________________________________
  2499.  
  2500.  
  2501.  
  2502.               The FREE and MEMORY commands help you keep track of system
  2503.               resources.  FREE tells you about free space on your disk
  2504.               drives (and is much faster than CHKDSK).  MEMORY tells you
  2505.               about memory resources, including expanded and extended memory
  2506.               and 4DOS's internal alias and history storage areas.  Here are
  2507.               examples of the output from our test system; try the commands
  2508.               on your system and see what values you get.
  2509.  
  2510.                    c:\4dos> free
  2511.                     Volume in drive C is JPS_TEST    Serial number is ...
  2512.                      41,826,304 bytes total disk space
  2513.                      23,232,512 bytes used
  2514.                      18,593,792 bytes free
  2515.  
  2516.                    c:\4dos> memory
  2517.                         655,360 bytes total DOS RAM
  2518.                         612,256 bytes free
  2519.  
  2520.                       7,815,168 bytes total EMS memory
  2521.                         688,128 bytes free
  2522.  
  2523.                          12,288 bytes free XMS memory  (HMA in use)
  2524.  
  2525.                           1,792 bytes total environment
  2526.                             233 bytes free
  2527.  
  2528.                           6,144 bytes total alias
  2529.                           1,045 bytes free
  2530.  
  2531.                           1,024 bytes total history
  2532.  
  2533.               The TIMER command lets you time events.  The following line
  2534.               also shows 4DOS's ability to accept multiple commands on one
  2535.               line, separated by a caret [^].  It starts the timer, runs the
  2536.               TOUR2.BTM file to create the three demonstration files,
  2537.               deletes the three files, and then stops the timer and displays
  2538.               the time the whole operation took.  Enter this command to time
  2539.               the entire sequence on your computer:
  2540.  
  2541.                    c:\4dos> timer ^ tour2 ^ del file1 file2 file3 ^ timer
  2542.                    Timer 1 on: 11:10:01
  2543.  
  2544.                    Please wait ...
  2545.  
  2546.                    File creation completed
  2547.                    Deleting c:\4dos\file1
  2548.                    Deleting c:\4dos\file2
  2549.  
  2550.  
  2551.           ___________________________________________________________________
  2552.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  37
  2553.  
  2554.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2555.           ___________________________________________________________________
  2556.  
  2557.  
  2558.                    Deleting c:\4dos\file3
  2559.                         3 file(s) deleted
  2560.                    Timer 1 off: 11:10:06 elapsed: 0:00:05.11
  2561.  
  2562.               Now return to the log that you started a few minutes ago.
  2563.               Turn logging off, then take a look at what was recorded.
  2564.               Enter the following two commands;  the output will pause at
  2565.               the end of each page:
  2566.  
  2567.                    c:\4dos> log off
  2568.                    c:\4dos> type mylog /p
  2569.                    [ 8-22-91 11:05:02] cls bright white on magenta
  2570.                    [ 8-22-91 11:05:54] color bright yellow on blue
  2571.                    [ 8-22-91 11:07:08] free
  2572.                    [ 8-22-91 11:07:49] memory
  2573.                    [ 8-22-91 11:09:55] timer
  2574.                    [ 8-22-91 11:09:56] tour2
  2575.                      ... (commands from TOUR2.BTM will be displayed here)
  2576.                    [ 8-22-91 11:10:00] del file1 file2 file3
  2577.                    [ 8-22-91 11:10:01] timer
  2578.                    [ 8-22-91 11:12:35] log off
  2579.  
  2580.               As you can see, the log contains every command you entered
  2581.               plus a date and time stamp.  It's a complete record of system
  2582.               activity, including commands you type and those entered from
  2583.               batch files and aliases.  You can use it as a record of your
  2584.               work, for security purposes, or for anything else you desire.
  2585.               You may want to clean up the directory now by deleting this
  2586.               demonstration log with a DEL MYLOG command.
  2587.  
  2588.  
  2589.           Batch Programming
  2590.  
  2591.               This final section demonstrates a very little bit of what 4DOS
  2592.               can do for your batch files.  If you've never worked with
  2593.               batch files, you may want to skip this section.  If you aren't
  2594.               sure, give it a try and stop if things seem too complex.  You
  2595.               don't have to be a batch file programmer to use 4DOS.
  2596.  
  2597.               Rather than having you go to the trouble of writing actual
  2598.               batch files, we'll demonstrate some of the parts of 4DOS's
  2599.               batch file power that work just as well at the prompt.
  2600.  
  2601.               Some 4DOS batch file improvements aid in communicating with
  2602.               the user.  You can make sounds:
  2603.  
  2604.                    c:\4dos> beep 440 2 880 8 660 4
  2605.  
  2606.  
  2607.  
  2608.           ___________________________________________________________________
  2609.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  38
  2610.  
  2611.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2612.           ___________________________________________________________________
  2613.  
  2614.  
  2615.  
  2616.               You can draw boxes and lines.  Enter each of these commands on
  2617.               one line; use the second set of commands if you have a
  2618.               monochrome monitor:
  2619.  
  2620.                    c:\4dos> cls bright white on blue
  2621.                    c:\4dos> drawbox 10 10 20 70 4 bright cyan on black fill
  2622.                              black
  2623.                    c:\4dos> drawhline 15 10 61 1 bright cyan on black
  2624.  
  2625.                    c:\4dos> cls bright white on black
  2626.                    c:\4dos> drawbox 10 10 20 70 4 black on white fill white
  2627.                    c:\4dos> drawhline 15 10 61 1 black on white
  2628.  
  2629.               Notice that 4DOS correctly connects the line to the box where
  2630.               they intersect.  4DOS has additional commands like SCREEN and
  2631.               SCRPUT, which we won't demonstrate here, to display text
  2632.               anywhere on the screen and in any color.
  2633.  
  2634.               4DOS also helps you ask the user for input.  Try this (be sure
  2635.               to use two percent signs before the second "letter"):
  2636.  
  2637.                    c:\4dos> inkey Enter a letter: %%letter
  2638.                    Enter a letter: A
  2639.  
  2640.               The letter you typed was stored in your environment in the
  2641.               variable named LETTER.  Use the SET command to view it:
  2642.  
  2643.                    c:\4dos> set
  2644.                    COMSPEC=C:\4DOS\4DOS.COM
  2645.                     ... ... ...
  2646.                    LETTER=A
  2647.  
  2648.               The user can also type full strings if you use the INPUT
  2649.               command:
  2650.  
  2651.                    c:\4dos> input Enter a string: %%string
  2652.                    Enter a string: Type anything you like here ...
  2653.  
  2654.               Again, SET will let you view the string, stored in the
  2655.               environment variable STRING.
  2656.  
  2657.               Once you've collected some input, you will probably want to
  2658.               test it with the 4DOS IF and IFF commands.  Here's one
  2659.               example.  Enter this on one line (there's plenty of room;
  2660.               4DOS command lines can be up to 255 characters long).  Note
  2661.               that two percent signs are used in the INKEY command and one
  2662.  
  2663.  
  2664.  
  2665.           ___________________________________________________________________
  2666.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  39
  2667.  
  2668.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2669.           ___________________________________________________________________
  2670.  
  2671.  
  2672.               is used in the IFF, and that a double equal sign is used in
  2673.               the IFF statement.
  2674.  
  2675.                    c:\4dos> inkey Enter a letter: %%letter ^
  2676.                             iff "%letter"=="A" then ^ echo hi ^ else ^
  2677.                             echo bye ^ endiff
  2678.  
  2679.               Try using the up-arrow to repeat the command several times,
  2680.               giving different responses to the "Enter a letter" prompt.
  2681.  
  2682.               4DOS offers dozens of additional batch file improvements.  For
  2683.               more information see the section on batch files beginning on
  2684.               page 99, and the reference for each individual command.
  2685.  
  2686.  
  2687.           Conclusion
  2688.  
  2689.               This has been a very fast tour of some of the most popular
  2690.               features of 4DOS.  There are many more features, commands and
  2691.               options to explore, as well as ways to customize 4DOS so that
  2692.               it suits your computing habits and needs.  One of 4DOS's best
  2693.               features is its ability to adapt to your way of working
  2694.               instead of requiring you to adapt to it.
  2695.  
  2696.               If you selected "Tour Installation" when you ran the 4DOS
  2697.               INSTALL program, you will probably want to perform a full
  2698.               installation now.  You can put the 4DOS disk in your floppy
  2699.               drive, run INSTALL, and follow the instructions on the screen.
  2700.               If you need help, refer to the installation instructions on
  2701.               page 13.
  2702.  
  2703.               To learn more about specific 4DOS commands, look through the
  2704.               Command Reference section of this manual, beginning on page
  2705.               167.  To learn more about the dozens of 4DOS features that
  2706.               aren't related to specific commands, read through Chapter 5 /
  2707.               Using 4DOS, beginning on page 54.
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.           ___________________________________________________________________
  2723.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  40
  2724.  
  2725.                                                  CHAPTER 4 / GENERAL CONCEPTS
  2726.           ___________________________________________________________________
  2727.  
  2728.  
  2729.  
  2730.           CHAPTER 4 / GENERAL CONCEPTS
  2731.  
  2732.  
  2733.           You can start using 4DOS as soon as you finish installing it,
  2734.           because 4DOS is compatible with the traditional commands you're
  2735.           used to.  But most users find that the more they know about their
  2736.           computer systems, the more power they get from 4DOS.  And, the more
  2737.           experienced they become with 4DOS, the more they want to know about
  2738.           their computer system as a whole.
  2739.  
  2740.           This section of the manual explains some fundamental concepts about
  2741.           your computer, DOS, and 4DOS.  It should help you understand the
  2742.           terms and concepts in the pages that follow.  If you find some of
  2743.           the concepts overwhelming, just remember that they are here when
  2744.           you need them.  If you find this material too simple, skim over the
  2745.           topics and then go on to the next section.  Each topic in this
  2746.           chapter is independent, so if you read it straight through you
  2747.           won't necessarily find a natural "flow" from one topic to another.
  2748.  
  2749.           If you come across terms or concepts in this chapter that you are
  2750.           unsure about, refer to the Glossary on page 351 or the Index.
  2751.  
  2752.  
  2753.           DOS and the Command Interpreter
  2754.  
  2755.               When you turn on your computer, it first runs some internal
  2756.               diagnostics and then looks for a boot disk, either a floppy
  2757.               disk in drive A or your hard disk.  There is nothing magical
  2758.               about a boot disk;  it simply has a copy of DOS and a command
  2759.               interpreter available, plus a small block of special
  2760.               information that tells the computer that it is indeed a boot
  2761.               disk.
  2762.  
  2763.               The core portion of DOS consists of two hidden files (files
  2764.               that are normally invisible to the DIR command).  They aren't
  2765.               hidden to keep you from copying or examining them, but rather
  2766.               to keep you from accidentally erasing them.  The names of the
  2767.               files depend on the version of DOS you are using, but they are
  2768.               usually something like MSDOS.SYS and IO.SYS.  These two files
  2769.               contain the operating system, which controls your disk files
  2770.               and directories, loads and runs programs, maintains the system
  2771.               time and date, and performs other housekeeping tasks.
  2772.  
  2773.               After the computer loads DOS into memory, it performs some
  2774.               standard initialization tasks and then looks for a file called
  2775.               CONFIG.SYS, which contains user-specified initialization
  2776.               commands.  You can view and edit your CONFIG.SYS file with any
  2777.  
  2778.  
  2779.           ___________________________________________________________________
  2780.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  41
  2781.  
  2782.                                                  CHAPTER 4 / GENERAL CONCEPTS
  2783.           ___________________________________________________________________
  2784.  
  2785.  
  2786.               text editor.  One of the optional lines in CONFIG.SYS begins
  2787.               with the word SHELL.  That line names the command interpreter
  2788.               that DOS should load as it completes its initialization.
  2789.  
  2790.               A command interpreter is a program that accepts your
  2791.               instructions and carries them out.  The command interpreter
  2792.               shipped with DOS is called COMMAND.COM.  Once you have 4DOS
  2793.               installed, 4DOS.COM replaces COMMAND.COM as your command
  2794.               interpreter.  Both COMMAND.COM and 4DOS are normal programs
  2795.               that know how to translate your commands into actions.  4DOS
  2796.               is simply a much more powerful command interpreter than
  2797.               COMMAND.COM.
  2798.  
  2799.  
  2800.               Primary and Secondary Shells
  2801.  
  2802.               Technically, the command interpreter is a shell:  a program
  2803.               that understands your commands and makes the correct calls to
  2804.               DOS to perform various operations, including running programs.
  2805.  
  2806.               The command interpreter that runs when the computer boots up
  2807.               is called the primary shell.  Any command interpreter that is
  2808.               run by an application program with a "shell to DOS" feature,
  2809.               or that is run by a multitasking program like Windows or
  2810.               DESQview, is a secondary shell.  4DOS can be run as a primary
  2811.               shell and as a secondary shell.
  2812.  
  2813.               A secondary shell has all the same features as a primary
  2814.               shell, but you can leave a secondary shell with the EXIT
  2815.               command.  There is no way to exit from the primary shell,
  2816.               because your computer needs a shell present to operate.  (You
  2817.               can exit from the primary shell in one special case:  if
  2818.               you're running in a DOS session under OS/2 version 2.0.)
  2819.  
  2820.               There are only a few differences between primary and secondary
  2821.               shells.  Generally, less memory is available when a secondary
  2822.               shell is running, because at least part of the program that
  2823.               started it is still in memory waiting to spring back to life
  2824.               when you exit.  And normally only the primary shell
  2825.               automatically executes the instructions in your AUTOEXEC.BAT
  2826.               file.
  2827.  
  2828.               You may also see the term shell used to describe programs
  2829.               which assist you in managing your files (for example XTree or
  2830.               Lotus Magellan).  This is a different and less precise meaning
  2831.               of "shell" than the one used above and elsewhere in this
  2832.               manual.  Such programs are also sometimes called "visual
  2833.               shells" because they use a menu or graphical interface to
  2834.  
  2835.  
  2836.           ___________________________________________________________________
  2837.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  42
  2838.  
  2839.                                                  CHAPTER 4 / GENERAL CONCEPTS
  2840.           ___________________________________________________________________
  2841.  
  2842.  
  2843.               receive commands.  Unlike 4DOS, these programs are not command
  2844.               interpreters, and cannot replace COMMAND.COM.
  2845.  
  2846.  
  2847.               AUTOEXEC.BAT, 4START, and 4EXIT
  2848.  
  2849.               When a primary shell, either COMMAND.COM or 4DOS, gets control
  2850.               from DOS during boot up, one of its first responsibilities is
  2851.               to look for and run a batch file called AUTOEXEC.BAT, if that
  2852.               file is available in the root directory of the boot drive.
  2853.               This file is simply a list of commands that you want to have
  2854.               executed every time your computer boots up.  If COMMAND.COM
  2855.               cannot find AUTOEXEC.BAT, it asks you for the time and date.
  2856.               4DOS skips that step and immediately displays a standard
  2857.               prompt (e.g., c:\>).
  2858.  
  2859.               Every time 4DOS starts as either a primary or secondary shell,
  2860.               it also looks for an optional batch file called 4START.BTM or
  2861.               4START.BAT, and runs the file if it finds it.  4START is a
  2862.               convenient place to put special 4DOS configuration commands.
  2863.  
  2864.               Whenever you exit from a 4DOS secondary shell, 4DOS looks for
  2865.               another optional file called 4EXIT.BTM or 4EXIT.BAT and runs
  2866.               the file if it finds it.  4EXIT is not necessary in most
  2867.               circumstances, but is a convenient place to put commands to
  2868.               save information from a secondary shell before it exits.
  2869.  
  2870.               AUTOEXEC.BAT, 4START, and 4EXIT are called automatic batch
  2871.               files because they run without your intervention at specific
  2872.               times.  4START and 4EXIT should not be used to load any memory
  2873.               resident programs (TSRs).  Otherwise, these three files can
  2874.               include any commands that could be part of any batch file or
  2875.               any commands which you could type from the command line.
  2876.  
  2877.               For more details about batch files and batch file commands,
  2878.               see pages 99 and 168.
  2879.  
  2880.  
  2881.           Command Processing
  2882.  
  2883.               Whenever you type something at the command line and press the
  2884.               Enter key, you have given a command to 4DOS, which must figure
  2885.               out how to execute your command.  If you understand the
  2886.               general process that 4DOS uses, you will be able to make the
  2887.               best use of the 4DOS commands.
  2888.  
  2889.               4DOS begins by dividing the line you typed into an action word
  2890.               and a command tail.  The action word is the first word in the
  2891.  
  2892.  
  2893.           ___________________________________________________________________
  2894.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  43
  2895.  
  2896.                                                  CHAPTER 4 / GENERAL CONCEPTS
  2897.           ___________________________________________________________________
  2898.  
  2899.  
  2900.               command;  the tail is everything that follows the command
  2901.               word.  For example, in the command line
  2902.  
  2903.                    dir *.txt /p/o/n
  2904.  
  2905.               the action word is "dir," and the command tail is "*.txt
  2906.               /p/o/n."
  2907.  
  2908.               To decide what activity to perform, 4DOS makes five attempts
  2909.               to understand the action word:
  2910.  
  2911.               First, 4DOS tries to match the action word against its
  2912.               internal list of aliases, which are synonyms that you have
  2913.               defined for commands.  If it finds a match between the action
  2914.               word you typed and one of the aliases you've defined, it
  2915.               replaces the action word you typed with the action word from
  2916.               the alias.  (This substitution is done internally, and is not
  2917.               normally visible to you).  Once it has finished with the
  2918.               aliases, 4DOS continues with the steps listed below to
  2919.               identify the meaning of the new action word.
  2920.  
  2921.                    4DOS first tries to match the action word against its
  2922.                    list of more than 80 internal commands, which are actions
  2923.                    that are built into 4DOS.  If it finds a match, 4DOS
  2924.                    performs the internal command and then waits for a new
  2925.                    instruction from you.
  2926.  
  2927.                    If there is no match with any of 4DOS's internal
  2928.                    commands, it looks for an executable file (one with a
  2929.                    .COM or .EXE extension) whose name matches the action
  2930.                    word.  It runs the executable file if it finds one.  This
  2931.                    is called an external command or external program.
  2932.  
  2933.                    Next, 4DOS looks for a batch file (with a .BTM or .BAT
  2934.                    extension) that matches the action word.  If it finds
  2935.                    such a file, it then reads each line in the file as a new
  2936.                    command.
  2937.  
  2938.                    Finally, 4DOS checks to see if the action word matches
  2939.                    the name of a file with an extension that you have
  2940.                    defined as executable.  If a match is found, 4DOS runs
  2941.                    the program you specified when you defined the executable
  2942.                    extension.  (Executable extensions are used to associate
  2943.                    file extensions with the specific program that processes
  2944.                    a particular type of file; see page 76 for details).
  2945.  
  2946.               4DOS first tries the last three steps in the current
  2947.               directory.  If the action word doesn't match a .COM, .EXE,
  2948.  
  2949.  
  2950.           ___________________________________________________________________
  2951.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  44
  2952.  
  2953.                                                  CHAPTER 4 / GENERAL CONCEPTS
  2954.           ___________________________________________________________________
  2955.  
  2956.  
  2957.               .BTM, or .BAT file or an executable extension in the current
  2958.               directory, 4DOS repeats its search in every directory in your
  2959.               PATH.  The PATH is a list of directories that 4DOS (and some
  2960.               applications) search to look for executable files.  If all
  2961.               these searches fail, 4DOS displays an "Unknown command" error
  2962.               message and waits for your next instruction.
  2963.  
  2964.               If 4DOS finds a matching internal command in the first step,
  2965.               that command begins its activity by examining the command
  2966.               tail.  Some commands require information in the command tail,
  2967.               some accept optional information, and others don't allow any
  2968.               command tail at all.  The command tail for internal commands
  2969.               usually contains filenames, directory names, option switches
  2970.               which modify the command's behavior, or other information.
  2971.  
  2972.               4DOS makes the command tail available to every alias, batch
  2973.               file, and external command that it executes.  Aliases and
  2974.               batch files can examine the command tail by using "replaceable
  2975.               parameters," (see page 101).  External commands examine the
  2976.               command tail in a manner determined by the programmer who
  2977.               wrote that particular external program.
  2978.  
  2979.               It is up to each command to examine the command tail to make
  2980.               sure that the information it has received makes sense.  If you
  2981.               use an option switch which the command doesn't understand, or
  2982.               if you omit a required piece of information, the command
  2983.               issues an error message and ends.  Therefore, the command
  2984.               lines that you create must fit the format that each alias,
  2985.               internal or external command, or batch file expects.
  2986.  
  2987.               The process that internal and external commands go through to
  2988.               separate the individual elements of the command line, make
  2989.               sure you used the correct syntax, and understand what you have
  2990.               requested, is called parsing.
  2991.  
  2992.  
  2993.           Files and Paths
  2994.  
  2995.               You may have dozens, hundreds, or thousands of files stored on
  2996.               your computer's disks.  DOS is responsible for managing all of
  2997.               these files.  In order to do so, it uses a unique name to
  2998.               locate each file in much the same way that the post office
  2999.               assigns a unique address to every residence.
  3000.  
  3001.               The unique name of any file is composed of a drive letter, a
  3002.               directory path, and a filename.  Each of these parts of the
  3003.               file's name is case insensitive;  you can mix upper and lower
  3004.               case letters in any way you wish.
  3005.  
  3006.  
  3007.           ___________________________________________________________________
  3008.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  45
  3009.  
  3010.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3011.           ___________________________________________________________________
  3012.  
  3013.  
  3014.  
  3015.               A drive letter designates which drive contains the file.  In a
  3016.               file's full name, the drive letter is followed by a colon.
  3017.               Drive letters A: and B: are normally reserved for the floppy
  3018.               disk drives.  (Systems with a single drive use both A: and B:
  3019.               for that drive.  DOS asks you to swap diskettes as necessary
  3020.               to turn that single physical drive into two separate logical
  3021.               disk drives.)
  3022.  
  3023.               Normally, drive C: is the first (or only) hard disk drive.
  3024.               Later versions of DOS and some utility programs can divide a
  3025.               large hard disk into multiple logical drives that are usually
  3026.               called C:, D:, E:, etc.  Also, the DOS utility SUBST lets you
  3027.               use drive letters as a substitute for directory names.  Many
  3028.               network systems (LANs) use a similar feature to give drive
  3029.               letters to sections of the network file server drives.
  3030.  
  3031.               Some computers also have "RAM disks", which are areas of
  3032.               memory set aside by software (a "RAM disk driver") for use as
  3033.               fast, but temporary storage.  RAM disks are also assigned
  3034.               drive letters, typically using letters beyond that used by the
  3035.               last hard disk in the system, but before any network drives.
  3036.               For example, on a system with a large hard disk you might have
  3037.               A: and B: as floppy drives, C:, D:, and E: as parts of the
  3038.               hard disk, F: as a RAM disk, and G: and H: as network drives.
  3039.  
  3040.               Directories are used to divide the files on a drive into
  3041.               logical groups that are easy to work with.  Their purpose is
  3042.               similar to the use of file drawers to contain groups of
  3043.               hanging folders, hanging folders to contain smaller manila
  3044.               folders, and so on.
  3045.  
  3046.               Every drive has a root or base directory, and many have one or
  3047.               more subdirectories.  Subdirectories can also have
  3048.               subdirectories, extending in a branching tree structure from
  3049.               the root directory.  The collection of all directories on a
  3050.               drive is often called the directory tree, and a portion of the
  3051.               tree is sometimes called a subtree.  The terms directory and
  3052.               subdirectory are typically used interchangeably to mean a
  3053.               single subdirectory within this tree structure.
  3054.  
  3055.               Subdirectory names follow the same naming rules as files (see
  3056.               below): a base name followed by an optional extension.
  3057.               However, some application programs do not properly handle
  3058.               subdirectory names that have an extension.  It is best to use
  3059.               only an 8 character (or less) name, without an extension, for
  3060.               subdirectories.
  3061.  
  3062.  
  3063.  
  3064.           ___________________________________________________________________
  3065.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  46
  3066.  
  3067.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3068.           ___________________________________________________________________
  3069.  
  3070.  
  3071.  
  3072.               The drive and subdirectory portion of a file's name are
  3073.               collectively called the file's path.  For example, the file
  3074.               name C:\DIR1\DIR2\MYFILE.DAT says to look for the file
  3075.               MYFILE.DAT in the subdirectory DIR2 which is part of the
  3076.               subdirectory DIR1 which is on drive C.  The path for
  3077.               MYFILE.DAT is C:\DIR1\DIR2.  The backslashes between
  3078.               subdirectory names are required.  The total length of a file's
  3079.               path may not exceed 64 characters (excluding the file name and
  3080.               extension, but including the drive letter and colon).
  3081.  
  3082.               DOS remembers both a current or default drive for your system
  3083.               as a whole, and a current or default directory for every drive
  3084.               in your system.  Whenever a program tries to create or access
  3085.               a file without specifying the file's path, DOS uses the
  3086.               current drive (if no other drive is specified) and the current
  3087.               directory (if no other directory path is specified).
  3088.  
  3089.               The root directory is named using the drive letter and a
  3090.               single backslash.  For example, D:\ refers to the root
  3091.               directory of drive D:.  Using a drive letter with no directory
  3092.               name at all refers to the current directory on the specified
  3093.               drive.  For example, E:4DOS.DOC refers to the file 4DOS.DOC in
  3094.               the current directory on drive E:.
  3095.  
  3096.               There are also two special subdirectory names that are useful
  3097.               in many situations: a single period [.] by itself means "the
  3098.               current default directory."  Two periods together [..] means
  3099.               "the directory which contains the current default directory"
  3100.               (often referred to as the parent directory).  These special
  3101.               names can be used wherever a full directory name can be used.
  3102.               4DOS allows you to use additional periods to specify
  3103.               directories further "up" the tree (see page 190).
  3104.  
  3105.               Finally, each file has a filename.  The filename consists of a
  3106.               base name of 1 to 8 characters plus an optional extension
  3107.               composed of a period plus 1 to 3 more characters.  You can use
  3108.               alphabetic and numeric characters plus the punctuation marks !
  3109.               # $ % & ' ( ) - @ ^ _ ` { } and ~ in both the base name and
  3110.               the extension.  Because the exclamation point [!], percent
  3111.               sign [%], caret [^], at-sign [@], parentheses [()], and back-
  3112.               quote [`] also have other meanings to 4DOS, it is best to
  3113.               avoid using them in filenames.
  3114.  
  3115.               Each file also has attributes which define characteristics of
  3116.               the file which may be useful to DOS, to you, or to an
  3117.               application program.  Attributes can be set with 4DOS's ATTRIB
  3118.               command (see page 183) and viewed with the ATTRIB and DIR
  3119.  
  3120.  
  3121.           ___________________________________________________________________
  3122.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  47
  3123.  
  3124.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3125.           ___________________________________________________________________
  3126.  
  3127.  
  3128.               commands.  Every time a program modifies a file, DOS sets the
  3129.               Archive attribute, which signals that the file has been
  3130.               modified since it was last backed up.  This can be used by
  3131.               4DOS to determine which files to COPY, and by backup programs
  3132.               to determine which files to back up.  When the Read-only
  3133.               attribute is set, the file can't be changed or erased; this
  3134.               can be used to protect important files from damage.  The
  3135.               Hidden and System attributes prevent the file from appearing
  3136.               in normal directory listings.  The 4DOS DIR command (see page
  3137.               211) has options which allow you to select filenames to view
  3138.               based on their attributes, to view the attributes themselves,
  3139.               and to view information about normally "invisible" hidden and
  3140.               system files.
  3141.  
  3142.               When a file is created, and every time it is modified, DOS
  3143.               records the system time and date in a time stamp in the file's
  3144.               directory entry.  Several 4DOS commands and variable
  3145.               functions, and many backup and utility programs, use this time
  3146.               stamp to determine the relative ages of files.
  3147.  
  3148.  
  3149.           The Environment
  3150.  
  3151.               The command interpreter keeps a list of information about your
  3152.               computer in memory.  This list is called the environment.
  3153.               Every program receives a copy of the environment when it
  3154.               begins, and many programs use some of its information to
  3155.               configure themselves or to find files.
  3156.  
  3157.               The environment is arranged as a series of variables and their
  3158.               related values.  Each variable is a name stored in upper case.
  3159.               The name is followed by an equal sign [=] and some text.  You
  3160.               can view the environment with the SET command, and add new
  3161.               entries or edit existing entries with SET and ESET.  A typical
  3162.               environment entry looks like this:
  3163.  
  3164.                LIB=c:\lib
  3165.  
  3166.               In this example, the name of the variable is LIB and its value
  3167.               is "c:\lib."
  3168.  
  3169.               The format and meaning of each entry in the environment is up
  3170.               to the program that uses the particular variable.  Environment
  3171.               variables can contain just about anything, and can be used for
  3172.               any purpose the author of a program desires.  The "purpose" of
  3173.               the environment as a whole is simply to hold small amounts of
  3174.               text which programs can then access according to their own
  3175.               rules.  Most environment variables are used by single programs
  3176.  
  3177.  
  3178.           ___________________________________________________________________
  3179.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  48
  3180.  
  3181.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3182.           ___________________________________________________________________
  3183.  
  3184.  
  3185.               for their own information;  a few have well-defined meanings
  3186.               and are used by many different programs.
  3187.  
  3188.               One of the most important environment variables is called
  3189.               PATH.  The text of PATH is a list of subdirectories separated
  3190.               by semi-colons.  4DOS searches each of the subdirectories
  3191.               listed in the PATH entry to find executable files that aren't
  3192.               in the default directory.  Many programs also search the PATH
  3193.               list to find their own files.
  3194.  
  3195.               4DOS uses several environment variables to control its own
  3196.               behavior, and provides a wide range of facilities for
  3197.               manipulating and managing the environment.  See page 116 for
  3198.               additional details.
  3199.  
  3200.  
  3201.           Memory
  3202.  
  3203.               The memory in your computer is organized in bytes.  Normally,
  3204.               the amount of memory in a computer is discussed in terms of
  3205.               kilobytes (KBytes or 1,024 bytes) and megabytes (MBytes or
  3206.               1,048,576 bytes or 1,024 KBytes).  The amount of memory
  3207.               available in your computer is determined by the number of
  3208.               memory chips you have installed.
  3209.  
  3210.               In an ideal world, there would be little more to say about
  3211.               memory.  But because of the history of PCs, the needs of large
  3212.               application programs, and the capabilities of advanced CPUs,
  3213.               there are many different kinds of memory.  The original 8088
  3214.               CPUs of the PC and PC/XT can address 1 MByte of memory.  Of
  3215.               that, a maximum of 640KBytes is allocated as base,
  3216.               conventional, DOS, or low DOS memory (all these terms mean the
  3217.               same thing).  The other 384 KBytes, known as upper memory, are
  3218.               set aside for the computer's built-in ROM BIOS, video adapter
  3219.               cards, hard disk controllers, and other expansion hardware.
  3220.  
  3221.               When base memory became too limiting, expanded memory (or EMS
  3222.               memory) was developed to give programs more data space.
  3223.               Expanded memory adds up to 16 MBytes which programs can
  3224.               access, 64KBytes at a time, through a window in upper memory.
  3225.               In 8088 / 8086 (PC and XT), and 80286 (AT) based computers,
  3226.               expanded memory typically requires an add-on board and support
  3227.               software.  In 386 and 486 computers, expanded memory is
  3228.               typically provided without additional hardware, using the
  3229.               capabilities of the 386/486 chips.
  3230.  
  3231.               The 80286 CPU used in the AT, and modern 386 and 486 CPUs, can
  3232.               use much more than the 8088's original 1 MByte of memory.  An
  3233.  
  3234.  
  3235.           ___________________________________________________________________
  3236.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  49
  3237.  
  3238.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3239.           ___________________________________________________________________
  3240.  
  3241.  
  3242.               80286 can use a total of 16 MBytes;  the 386 and 486 can use
  3243.               up to a whopping 4,096 MBytes.  This extended memory is not
  3244.               normally available to DOS-based programs, however, without
  3245.               special programming techniques and the help of DOS extenders
  3246.               or memory managers.
  3247.  
  3248.               The memory terms used in this manual include
  3249.  
  3250.                    BASE memory:  The 640 Kbytes or less that has
  3251.                    traditionally been available for DOS and DOS-based
  3252.                    applications.
  3253.  
  3254.                    EMS or LIM EMS Memory:  Memory which conforms to the
  3255.                    Expanded Memory Specification, developed by Lotus, Intel,
  3256.                    and Microsoft, that lets programs and utilities share
  3257.                    expanded memory.
  3258.  
  3259.                    Extended Memory:  Memory beyond 1 MB in 80286, 386, and
  3260.                    486 computers.  This memory may be accessed directly, in
  3261.                    which case it is referred to as Extended Memory, or
  3262.                    through XMS software, in which case it is referred to as
  3263.                    XMS Memory (see below).
  3264.  
  3265.                    XMS Memory:  Extended memory managed by software which
  3266.                    conforms to the Extended Memory Specification (XMS).  XMS
  3267.                    lets programs share extended memory without conflict.
  3268.                    This specification divides extended memory into extended
  3269.                    memory blocks (EMBs).  XMS software also usually manages
  3270.                    the HMA and the UMBs (see below).
  3271.  
  3272.                    HMA:  The first 64K bytes of extended memory, located
  3273.                    just above 1 MB.  Certain specialized programs such as
  3274.                    DESQview, some network drivers, and portions of MS-DOS
  3275.                    5.0 and DR-DOS 5.0 can be loaded into the HMA instead of
  3276.                    taking up valuable space in base memory.
  3277.  
  3278.                    UMBs:  386 and 486 computers can electronically move
  3279.                    pieces of extended memory into unused space in the upper
  3280.                    memory area between 640KB and 1 MB.  Each block of this
  3281.                    memory is called an Upper Memory Block (UMB).  With DOS
  3282.                    5.0 or special 386/486 memory managers, memory-resident
  3283.                    programs can be loaded into these UMBs instead of taking
  3284.                    up valuable space in base memory.  Some 8086, 8088, and
  3285.                    80286 systems can also use UMBs with appropriate
  3286.                    additional hardware and software (see page 144 for
  3287.                    details).
  3288.  
  3289.  
  3290.  
  3291.  
  3292.           ___________________________________________________________________
  3293.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  50
  3294.  
  3295.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3296.           ___________________________________________________________________
  3297.  
  3298.  
  3299.  
  3300.  
  3301.           ASCII and Key Codes
  3302.  
  3303.               Internally, computers use numbers for everything.  To
  3304.               represent the text that you type, a computer must translate
  3305.               each letter to and from a number.  For all PC-compatible
  3306.               computers, the code used for this translation is called ASCII
  3307.               (American Standard Code for Information Interchange).  ASCII
  3308.               codes are used both for the characters you type and for the
  3309.               characters that are displayed on the screen.
  3310.  
  3311.               The original ASCII code has 128 values for upper and lower
  3312.               case letters, numerals, punctuation marks, and control codes.
  3313.               The control codes correspond to pressing the Ctrl key plus an
  3314.               alphabetic character.  Some control codes are also represented
  3315.               on the keyboard with such keys as Tab, Enter, Backspace, and
  3316.               Esc.  IBM, in its original PC, defined an additional 128
  3317.               extended ASCII codes for math symbols, international
  3318.               characters, the line characters used to draw boxes, and some
  3319.               miscellaneous symbols.  You can enter extended ASCII codes on
  3320.               the keyboard by holding down the Alt key while you type the
  3321.               code number on the numeric key pad.
  3322.  
  3323.               Do not confuse extended ASCII with extended key codes.  The
  3324.               latter include special codes that the computer generates when
  3325.               you press a function key, cursor key, or Alt plus a letter.
  3326.               Those keys do not have any representation in either the ASCII
  3327.               or extended ASCII code systems.  Another set of key codes,
  3328.               called scan codes, is discussed in the section on the keyboard
  3329.               below.
  3330.  
  3331.               Appendix B on page 334 has a complete list of ASCII, extended
  3332.               ASCII, and extended key codes.
  3333.  
  3334.  
  3335.           The Keyboard
  3336.  
  3337.               The original IBM PC, PC/XT, and virtually all XT-compatible
  3338.               computers use an 83-key keyboard with 10 function keys.  The
  3339.               earliest PC/AT computer and compatibles added an 84th key,
  3340.               called SysReq, but left the rest of the keyboard the same.
  3341.               Most 80286, 386, and 486 computers now use an "enhanced"
  3342.               keyboard with 101 or more keys, including 12 or more function
  3343.               keys.
  3344.  
  3345.               When you press a single key or a key combination, the computer
  3346.               translates the keystroke into two numbers.  For all
  3347.  
  3348.  
  3349.           ___________________________________________________________________
  3350.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  51
  3351.  
  3352.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3353.           ___________________________________________________________________
  3354.  
  3355.  
  3356.               alphabetic, numeric, and punctuation keys, the Tab, Enter,
  3357.               Backspace, Esc keys and Ctrl plus an alphabetic key, these
  3358.               numbers are an ASCII code plus a scan code.  The ASCII code
  3359.               represents the key's meaning; the scan code identifies which
  3360.               specific key was pressed.  For example, many keyboards have
  3361.               two plus [+] keys, one above the equal sign and one on the
  3362.               numeric keypad.  Both generate the same ASCII code, but they
  3363.               generate different scan codes.
  3364.  
  3365.               Keys which are not represented by ASCII codes are translated
  3366.               to an ASCII 0 plus an extended key code.  These keys include
  3367.               the function keys, the cursor keys, and Alt plus a key.  The
  3368.               extended key code for a key is generally the same as the scan
  3369.               code for that key.
  3370.  
  3371.               Some keys, like the Alt, Ctrl, and Shift by themselves or in
  3372.               combination with each other, plus the Print Screen, SysReq,
  3373.               Scroll Lock, Pause, Break, Num Lock, and Caps Lock do not have
  3374.               any code representations at all.  The computer performs
  3375.               special actions automatically when you press these keys (for
  3376.               example, it switches your keyboard into Caps Lock mode when
  3377.               you press the Caps Lock key), and does not report the
  3378.               keystrokes to whatever program is running unless the program
  3379.               has been written specially to accept them.
  3380.  
  3381.               It is up to the computer to smooth over the differences
  3382.               between the different keyboards.  That is part of the reason
  3383.               why not all keyboards can be used with all computers.
  3384.  
  3385.               Appendix B has a complete list of ASCII and scan codes of each
  3386.               of the keys on your keyboard.
  3387.  
  3388.  
  3389.           Video
  3390.  
  3391.               4DOS is a "character-based" program, which means that it works
  3392.               in text mode on your computer.  In text mode, the screen
  3393.               displays text in a single font, but cannot mix fonts or
  3394.               display graphics.  4DOS can run graphics programs which change
  3395.               your screen to graphics mode, but the screen must be returned
  3396.               to text mode whenever 4DOS is active.  In the early days of
  3397.               the IBM PC, text mode was a single, simple video operating
  3398.               environment.  Today, advanced video boards and video software
  3399.               have created a wide range of text modes.
  3400.  
  3401.               The original IBM PC monochrome and CGA color video cards can
  3402.               display 80 columns and 25 rows of text.  Newer, advanced video
  3403.               systems normally run in this 80 x 25 display mode but can also
  3404.  
  3405.  
  3406.           ___________________________________________________________________
  3407.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  52
  3408.  
  3409.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3410.           ___________________________________________________________________
  3411.  
  3412.  
  3413.               display more columns and rows.  For example, EGA video cards
  3414.               can display 43 rows of text and VGA video cards can display 50
  3415.               rows.  With special driver programs, a VGA can display 60 rows
  3416.               or more and up to 132 columns of text.  Each of these
  3417.               different screen configurations is a different text mode.
  3418.  
  3419.               4DOS supports whatever number of rows and columns of text you
  3420.               decide to use.  It doesn't have commands to switch from one
  3421.               screen size to another -- you will need to use the software
  3422.               that came with your computer or video board to do that -- but
  3423.               it can read and work with the number of rows and columns on
  3424.               your screen.
  3425.  
  3426.  
  3427.           ANSI Drivers
  3428.  
  3429.               Every version of DOS includes a program called ANSI.SYS.  This
  3430.               program lets you use text colors other than drab white on
  3431.               black, redefine keys, and control screen output.  Commercial
  3432.               ANSI drivers are available as replacements for ANSI.SYS.  The
  3433.               commercial programs usually include many new features, boost
  3434.               screen display speed dramatically, and support text displays
  3435.               that have more than 80 columns and 25 lines.
  3436.  
  3437.               4DOS automatically determines whether you have an ANSI driver
  3438.               installed.  If you do, 4DOS will use the driver to clear the
  3439.               screen and set screen colors.
  3440.  
  3441.               Several 4DOS commands provide replacements for traditional
  3442.               ANSI.SYS commands.  For example, 4DOS has commands to set the
  3443.               screen colors and display text in specific colors.  These
  3444.               commands are easier to understand and use than traditional
  3445.               ANSI.SYS control sequences.  Some of these commands manipulate
  3446.               screen colors directly.  Others use an ANSI driver if one is
  3447.               installed, but save you the work of figuring out complex ANSI
  3448.               control sequences.  Any special interaction between 4DOS
  3449.               commands and the ANSI.SYS driver is described in the
  3450.               documentation for each command.
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.           ___________________________________________________________________
  3464.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  53
  3465.  
  3466.                                                        CHAPTER 5 / USING 4DOS
  3467.           ___________________________________________________________________
  3468.  
  3469.  
  3470.  
  3471.           CHAPTER 5 / USING 4DOS
  3472.  
  3473.  
  3474.           4DOS is both a collection of commands and a set of features which
  3475.           make your computer easier to use.  The commands are explained in
  3476.           the Command Reference section which begins on page 167.  This
  3477.           section of the manual primarily explains each of the 4DOS features
  3478.           that are not directly related to individual commands.
  3479.  
  3480.           Most of the features described in this section are easy to use, but
  3481.           a few are more technical in nature.  Such features are marked with
  3482.           a ## next to the feature name or the paragraph which describes the
  3483.           feature's operation.
  3484.  
  3485.           As you read through this section, we urge you to experiment with
  3486.           the features that catch your interest and pass over any which seem
  3487.           too complicated.  Come back to this section as you gain expertise
  3488.           with 4DOS, and you will probably discover that the more complex
  3489.           features will seem easy and very useful.  4DOS doesn't require that
  3490.           you learn any more than you want, and even if you are a computer
  3491.           novice, you'll find some features that will interest you
  3492.           immediately.
  3493.  
  3494.           If you come across terms or concepts in this chapter that you are
  3495.           unsure about, refer to Chapter 4 / General Concepts, the Glossary
  3496.           on page 351, or the Index.
  3497.  
  3498.  
  3499.           At the Command Line
  3500.  
  3501.               4DOS displays a c:\> prompt when it is waiting for you to
  3502.               enter a command.  (The actual text depends on the current
  3503.               drive and directory, as well as your PROMPT settings.)  This
  3504.               is called the command line and the prompt is 4DOS's way of
  3505.               asking you to enter a command, an alias or batch file name, or
  3506.               the instructions necessary to begin an application program.
  3507.  
  3508.               This section of the manual explains the 4DOS features that
  3509.               will help you while you are typing in commands, and how 4DOS
  3510.               interprets keystrokes entered at the command line.  The
  3511.               keystrokes discussed here are the ones 4DOS normally uses.  If
  3512.               you prefer using different keystrokes to perform these
  3513.               functions, you can reassign virtually all 4DOS keystrokes with
  3514.               keystroke directives in the 4DOS.INI configuration file (see
  3515.               page 119).
  3516.  
  3517.  
  3518.  
  3519.  
  3520.           ___________________________________________________________________
  3521.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  54
  3522.  
  3523.                                                        CHAPTER 5 / USING 4DOS
  3524.           ___________________________________________________________________
  3525.  
  3526.  
  3527.  
  3528.  
  3529.               Command Line Editing
  3530.  
  3531.               The 4DOS command line works like a single-line word processor,
  3532.               allowing you to edit any part the command line at any time
  3533.               before you press Enter to execute the command, or Esc to erase
  3534.               it.  4DOS extends the command line to a maximum of 255
  3535.               characters, and allows you to edit the command line even when
  3536.               it exceeds the width of your screen.
  3537.  
  3538.               4DOS recognizes the following editing keys when you are typing
  3539.               a command (the words Ctrl and Shift mean to press the Ctrl
  3540.               [Control] or Shift key together with the other key named):
  3541.  
  3542.               Cursor Movement:
  3543.  
  3544.                     Left arrow       Move the cursor left one character.
  3545.                     Right arrow      Move the cursor right one character.
  3546.                     Ctrl-Left arrow  Move the cursor left one word.
  3547.                     Ctrl-Right arrow Move the cursor right one word.
  3548.                     Home             Move the cursor to the beginning of the
  3549.                                      line.
  3550.                     End              Move the cursor to the end of the line.
  3551.  
  3552.               Insert and Delete:
  3553.  
  3554.                     Ins              Toggle between insert and overtype
  3555.                                      mode.
  3556.                     Del              Delete the character at the cursor.
  3557.                     Backspace        Delete the character to the left of the
  3558.                                      cursor.
  3559.                     Ctrl-L           Delete the word or partial word to the
  3560.                                      left of the cursor.
  3561.                     Ctrl-R or
  3562.                     Ctrl-Backspace   Delete the word or partial word to the
  3563.                                      right of the cursor.
  3564.                     Ctrl-Home        Delete from the beginning of the line
  3565.                                      to the cursor.
  3566.                     Ctrl-End         Delete from the cursor to the end of
  3567.                                      the line.
  3568.                     Esc              Delete the entire line.
  3569.                     Ctrl-C or
  3570.                     Ctrl-Break       Cancel the command.
  3571.                     Enter or Return  Execute the command line.
  3572.  
  3573.            ## Sometimes you may need to have 4DOS interpret a keystroke
  3574.               literally and place it on the command line instead of
  3575.  
  3576.  
  3577.           ___________________________________________________________________
  3578.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  55
  3579.  
  3580.                                                        CHAPTER 5 / USING 4DOS
  3581.           ___________________________________________________________________
  3582.  
  3583.  
  3584.               performing the usual action listed above.  For example,
  3585.               suppose you have a program that requires a Ctrl-R character on
  3586.               its command line.  Normally you couldn't type this keystroke
  3587.               at the 4DOS prompt, because 4DOS would interpret it as a
  3588.               "Delete word right" command.
  3589.  
  3590.               To get around this problem, use the special keystroke Alt-255.
  3591.               You enter Alt-255 by holding down the Alt key while you type
  3592.               255 on the numeric keypad, then releasing the Alt key (you
  3593.               must use the number keys on the numeric pad; the row of keys
  3594.               at the top of your keyboard won't work).  When 4DOS sees the
  3595.               Alt-255, it interprets the next keystroke literally and places
  3596.               it on the command line, ignoring any special meaning it would
  3597.               normally have as a 4DOS command line editing or history
  3598.               keystroke.  You can use Alt-255 to suppress the normal meaning
  3599.               of command line editing keystrokes even if they have been
  3600.               reassigned with key mapping directives in 4DOS.INI (see page
  3601.               119), and Alt-255 itself can be reassigned with the
  3602.               CommandEscape directive.
  3603.  
  3604.  
  3605.               Command History and Recall
  3606.  
  3607.               Each time you execute a command, 4DOS saves the command line
  3608.               in a command history list.  4DOS lets you display the saved
  3609.               commands, search the list, modify commands, and rerun
  3610.               commands.
  3611.  
  3612.               The simplest use of the command history list is to repeat a
  3613.               command exactly.  For example, you might enter the command
  3614.  
  3615.                    c:\> dir b:*.wks;*.doc
  3616.  
  3617.               to see some of the files on drive B.  You might move some new
  3618.               files to drive B and then want to repeat the DIR command.
  3619.               Just press the Up Arrow key repeatedly to scan back through
  3620.               the history list.  When the DIR command appears, press Enter
  3621.               to execute it again.
  3622.  
  3623.               After you have found a command, you can edit it before
  3624.               pressing Enter.  You will appreciate this feature when you
  3625.               have to execute a series of commands that differ only slightly
  3626.               from each other.
  3627.  
  3628.               The history list is "circular".  If you move to the last
  3629.               command in the list and then press the down arrow one more
  3630.               time, you'll see the first command in the list.  Similarly, if
  3631.               you move to the first command in the list and then press the
  3632.  
  3633.  
  3634.           ___________________________________________________________________
  3635.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  56
  3636.  
  3637.                                                        CHAPTER 5 / USING 4DOS
  3638.           ___________________________________________________________________
  3639.  
  3640.  
  3641.               up arrow one more time, you'll see the last command in the
  3642.               list.
  3643.  
  3644.               You can have 4DOS search the command history list to find a
  3645.               previous command quickly using command completion.  Just enter
  3646.               the first few characters of the command you want to find and
  3647.               press Up Arrow.  You only need to enter enough characters to
  3648.               identify the command that you want to find.  For example, to
  3649.               find the DIR command, enter DI and then press Up Arrow.  If
  3650.               you press the Up Arrow key a second time, 4DOS will display
  3651.               the next command that matches.  4DOS will beep if there are no
  3652.               matching commands.  The search process stops as soon as you
  3653.               type one of the 4DOS editing keys, whether or not the line is
  3654.               changed.  At that point, the line you're viewing becomes the
  3655.               new line to match if you press Up Arrow again.
  3656.  
  3657.               You can specify the size of the command history list with the
  3658.               History directive in 4DOS.INI (see page 126).  When the list
  3659.               is full, 4DOS discards the oldest commands to make room for
  3660.               new ones.  You can also use the HistMin directive in 4DOS.INI
  3661.               to enable or disable history saves and to specify the shortest
  3662.               command line that 4DOS will save (see page 130).
  3663.  
  3664.               You can prevent 4DOS from saving a command line by beginning
  3665.               it with an at-sign [@].
  3666.  
  3667.               Command History Keys:
  3668.  
  3669.                     Up Arrow         Recall the previous (or most recent)
  3670.                                      command, or the most recent command
  3671.                                      that matches a partial command line.
  3672.                     Down Arrow       Recall the next (or oldest) command, or
  3673.                                      the oldest command that matches a
  3674.                                      partial command line.
  3675.                     F3               Fill in the rest of the command line
  3676.                                      from the previous command, beginning at
  3677.                                      the current cursor position.
  3678.                     Ctrl-D           Delete the currently displayed history
  3679.                                      list entry, erase the command line, and
  3680.                                      display the previous matching history
  3681.                                      list entry.
  3682.                     Ctrl-E           Display the last entry in the history
  3683.                                      list.
  3684.                     Ctrl-K           Save the current command line in the
  3685.                                      history list without executing it, and
  3686.                                      then clear the command line
  3687.                     @                As the first character in a line:  Do
  3688.                                      not save the current line in the
  3689.  
  3690.  
  3691.           ___________________________________________________________________
  3692.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  57
  3693.  
  3694.                                                        CHAPTER 5 / USING 4DOS
  3695.           ___________________________________________________________________
  3696.  
  3697.  
  3698.                                      history list when it is executed; do
  3699.                                      not store it in the CMDLINE environment
  3700.                                      variable; and remove the CMDLINE
  3701.                                      variable from the environment (this
  3702.                                      helps reduce environment space when
  3703.                                      loading TSRs).
  3704.  
  3705.               Use F3 when your new command is different from your old one by
  3706.               just a character or two at the beginning.  For example,
  3707.               suppose you want to execute a DIR on several file names then
  3708.               use DEL to delete those same files.  After the DIR is complete
  3709.               type DEL and press F3; the rest of the command line will be
  3710.               completed for you.  Check that it's correct, and then press
  3711.               Enter to delete the files.  F3 also retrieves the entire
  3712.               previous command (like up-arrow) if nothing has been typed on
  3713.               the line.
  3714.  
  3715.               Use Ctrl-E to "get your bearings" by returning to the end of
  3716.               the list if you've scrolled around so much that you aren't
  3717.               sure where you are any more.
  3718.  
  3719.               Use Ctrl-K to save some work when you've typed a long command
  3720.               and then realize that you weren't quite ready.  For example,
  3721.               if you forget to change directories and notice it after a
  3722.               command is typed or mostly typed, but before you press Enter,
  3723.               just press Ctrl-K to save the command without executing it.
  3724.               Use the CD or CDD command to change to the right directory,
  3725.               press up-arrow twice to retrieve the command you saved, make
  3726.               any final changes to it, and press Enter to execute it.
  3727.  
  3728.  
  3729.               Command History Window
  3730.  
  3731.               You can also view the command history in a scrollable history
  3732.               window, and select the command to modify or re-execute from
  3733.               those displayed in the window.  To activate the history window
  3734.               press PgUp or PgDn at the command line.  4DOS will display a
  3735.               window in the upper right corner of the screen, with the
  3736.               command you most recently executed marked with a highlight.
  3737.               (If you just finished re-executing a command from the history,
  3738.               then the next command in sequence will be highlighted.)
  3739.  
  3740.               You can scroll the history window up and down one line at a
  3741.               time with Up Arrow and Down Arrow, and one page (screen) at a
  3742.               time with PgUp and PgDn.  The display is not circular as it is
  3743.               at the prompt, it has fixed beginning and end points.  Home or
  3744.               Ctrl-PgUp will go to the beginning of the history, and End or
  3745.               Ctrl-PgDn will go to the end.  The Ctrl-D (delete from
  3746.  
  3747.  
  3748.           ___________________________________________________________________
  3749.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  58
  3750.  
  3751.                                                        CHAPTER 5 / USING 4DOS
  3752.           ___________________________________________________________________
  3753.  
  3754.  
  3755.               history) key works within the history as it does at the
  3756.               command line.
  3757.  
  3758.               Once you have selected a command in the history window, press
  3759.               Enter to execute it immediately, or Ctrl-Enter to move the
  3760.               line to the prompt for editing (you can not edit the line
  3761.               directly in the history window).
  3762.  
  3763.               You can bring up a "filtered" history window by typing some
  3764.               characters on the command line, then pressing PgUp or PgDn.
  3765.               Only those commands matching the typed characters will be
  3766.               displayed in the window.
  3767.  
  3768.               You can control the position and size of the history window
  3769.               with directives in 4DOS.INI (see page 132).  You can also
  3770.               change the keys used in the window with key mapping directives
  3771.               in 4DOS.INI (see page 137).
  3772.  
  3773.               Command History Window:
  3774.  
  3775.                     PgUp or PgDn     (from the command line) Open the
  3776.                                      command history window.
  3777.                     Up Arrow         Scroll the display up one line.
  3778.                     Down Arrow       Scroll the display down one line.
  3779.                     PgUp             (inside the window) Scroll the display
  3780.                                      up one page.
  3781.                     PgDn             (inside the window) Scroll the display
  3782.                                      down one page.
  3783.                     Ctrl-PgUp or HomeGo to the beginning of the history
  3784.                                      list.
  3785.                     Ctrl-PgDn or End Go to the end of the history list.
  3786.                     Ctrl-D           Delete the selected line from the
  3787.                                      history list.
  3788.                     Enter            Execute the selected line.
  3789.                     Ctrl-Enter       Move the selected line to the command
  3790.                                      line for editing.
  3791.  
  3792.  
  3793.               Filename Completion
  3794.  
  3795.               4DOS's filename completion can help you by filling in a
  3796.               complete file name on the command line when you only remember
  3797.               part of the name.  For example, suppose you want to copy a
  3798.               file.  You know that its name begins AU but you can't remember
  3799.               the rest of the name.  Type
  3800.  
  3801.                    c:\> copy au
  3802.  
  3803.  
  3804.  
  3805.           ___________________________________________________________________
  3806.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  59
  3807.  
  3808.                                                        CHAPTER 5 / USING 4DOS
  3809.           ___________________________________________________________________
  3810.  
  3811.  
  3812.  
  3813.               and then press the Tab key or F9 key.  4DOS will search the
  3814.               current directory for filenames that begin AU and insert the
  3815.               first one onto the command line in place of the AU that you
  3816.               typed.
  3817.  
  3818.               If 4DOS found the file that you want, simply complete the
  3819.               command.  If it didn't find the file that you were looking
  3820.               for, press Tab again to substitute the next filename that
  3821.               begins with AU.  When there are no more filenames that match
  3822.               your pattern, 4DOS will beep each time you press Tab or F9.
  3823.  
  3824.               If you go past the filename that you want, press Shift-Tab or
  3825.               F8 to back up and 4DOS will return to the previous matching
  3826.               filename.  After you back up to the first filename, 4DOS will
  3827.               beep each time you press Shift-Tab.
  3828.  
  3829.               If you want to enter more than one matching filename on the
  3830.               same command line, press F10 when each desired name appears.
  3831.               4DOS will keep that name and place the next matching filename
  3832.               after it on the command line.  You can then use Tab (or F8)
  3833.               and Shift-Tab (or F9) to move through the remaining matching
  3834.               files.
  3835.  
  3836.               The pattern you use for matching may contain any valid
  3837.               filename characters, as well as wildcard characters and 4DOS's
  3838.               extended wildcards (see page 71).  For example, you can copy
  3839.               the first matching .TXT file by typing
  3840.  
  3841.                    c:\> copy *.txt
  3842.  
  3843.               and then pressing Tab.
  3844.  
  3845.               If you don't specify part of a filename before pressing Tab,
  3846.               4DOS will use *.* as the matching pattern.  If you type a
  3847.               filename without an extension, 4DOS will add *.* to the name.
  3848.               It will also place a "*" after a partial extension.  If you
  3849.               are typing a group of file names in an include list (see page
  3850.               75), 4DOS will use the part of the include list at the cursor
  3851.               as the pattern to match.
  3852.  
  3853.               When filename completion is used at the start of the command
  3854.               line, 4DOS will only try to match directories, executable
  3855.               files (.COM, .EXE, .BTM, and .BAT), and files with executable
  3856.               extensions, since these are the only file names that it makes
  3857.               sense to use at the start of a command.  If a directory is
  3858.               found a "\" will be appended to enable an automatic directory
  3859.               change (see below).
  3860.  
  3861.  
  3862.           ___________________________________________________________________
  3863.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  60
  3864.  
  3865.                                                        CHAPTER 5 / USING 4DOS
  3866.           ___________________________________________________________________
  3867.  
  3868.  
  3869.  
  3870.               If you would rather select files from a list of matching file
  3871.               names, see the SELECT command on page 293.
  3872.  
  3873.               Filename Completion Keys:
  3874.  
  3875.                     F8 or Shift-Tab  Get the previous matching filename.
  3876.                     F9 or Tab        Get the next matching filename.
  3877.                     F10              Keep the current matching filename and
  3878.                                      display the next matching name
  3879.                                      immediately after the current one.
  3880.  
  3881.  
  3882.               Multiple Commands
  3883.  
  3884.               At times, you probably know the next two or three commands
  3885.               that you want 4DOS to execute.  Instead of waiting for each
  3886.               one to finish before you type the next, you can type them all
  3887.               on the same command line, separated by a caret [^].  For
  3888.               example, if you know you want to copy all of your .TXT files
  3889.               to drive A: and then run CHKDSK to be sure that drive A's file
  3890.               structure is in good shape, you can type the following command
  3891.               line:
  3892.  
  3893.                    c:\> copy *.txt a: ^ chkdsk a:
  3894.  
  3895.               If you don't like using the caret as the command separator,
  3896.               you can pick another character using the SETDOS command (see
  3897.               page 301) or the CommandSep directive in 4DOS.INI (see page
  3898.               130).
  3899.  
  3900.               You may put as many commands on the command line as you wish,
  3901.               as long as the total length of the command line does not
  3902.               exceed 255 characters.
  3903.  
  3904.               You can use multiple commands in batch files (see page 99) and
  3905.               alias definitions (see page 97) as well as from the command
  3906.               line.
  3907.  
  3908.  
  3909.               Automatic Directory Changes
  3910.  
  3911.               4DOS's automatic directory change feature gives you a quick
  3912.               method for changing directories.  You can use an automatic
  3913.               directory change in place of the CD or CDD command.  To do so,
  3914.               simply type the name of the directory you want to change to at
  3915.               the prompt, with a backslash [\] at the end, and 4DOS will
  3916.               switch to that directory.  For example:
  3917.  
  3918.  
  3919.           ___________________________________________________________________
  3920.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  61
  3921.  
  3922.                                                        CHAPTER 5 / USING 4DOS
  3923.           ___________________________________________________________________
  3924.  
  3925.  
  3926.  
  3927.                    c:\> 4dos\
  3928.                    c:\4dos>
  3929.  
  3930.               This feature can make directory changes very simple when it's
  3931.               combined with the CDPATH environment variable (see page 117).
  3932.               CDPATH includes a list of directories for the CD and CDD
  3933.               commands to search if the directory you name does not exist
  3934.               below the current directory.  Automatic directory changes use
  3935.               CDPATH as well.  For example, suppose CDPATH is set to
  3936.               C:\;D:\;E:\, and the directory WIN exists on drive E:.  You
  3937.               can change to this directory with a single word on the command
  3938.               line:
  3939.  
  3940.                    c:\4dos> win\
  3941.                    e:\win>
  3942.  
  3943.               In executing the command shown above, 4DOS first looks for a
  3944.               WIN subdirectory of the current directory, i.e. C:\4DOS\WIN.
  3945.               If no such directory exists it looks for a WIN subdirectory in
  3946.               every directory in the CDPATH list, and changes to the first
  3947.               one it finds.
  3948.  
  3949.               Internally, automatic directory changes use the CDD command,
  3950.               so the text before the backslash can include a drive letter, a
  3951.               full path, or a partial path.  Arguments like "...." are
  3952.               allowed.  Automatic directory changes save the current
  3953.               directory, so it can be recalled with a "CDD -" or "CD -"
  3954.               command.  For more information on directory changes see CD on
  3955.               page 190 and CDD on page 192.
  3956.  
  3957.               Automatic directory changes will not work if the directory
  3958.               name you enter is the same as the name of a 4DOS internal
  3959.               command.  4DOS always checks for internal commands before
  3960.               automatic directory changes, to allow commands like CD\ to
  3961.               work.
  3962.  
  3963.  
  3964.               Temporarily Disabling Aliases
  3965.  
  3966.               At times, you may want to temporarily disable an alias that
  3967.               you have defined.  You may have an alias that changes the
  3968.               defaults of a particular command, for example, and want to run
  3969.               the unmodified version of the command.  To do so, precede the
  3970.               command name with an asterisk [*].  For example, if you have
  3971.               an alias for DIR which displays directories in 2-column paged
  3972.               mode by default, you can use the following command to display
  3973.               a directory in the normal single-column, non-paged mode:
  3974.  
  3975.  
  3976.           ___________________________________________________________________
  3977.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  62
  3978.  
  3979.                                                        CHAPTER 5 / USING 4DOS
  3980.           ___________________________________________________________________
  3981.  
  3982.  
  3983.  
  3984.                    c:\> *dir
  3985.  
  3986.  
  3987.               Command Line Help
  3988.  
  3989.               4DOS includes a complete help program (called 4HELP.EXE).  The
  3990.               help system includes complete help for all 4DOS internal
  3991.               commands, all standard DOS external commands, and many 4DOS
  3992.               features.  It is indexed and fully cross-referenced, so you
  3993.               can move easily among related commands.
  3994.  
  3995.               You can start the 4DOS help system to get help for any 4DOS or
  3996.               DOS command in several different ways.
  3997.  
  3998.               If you type HELP at the 4DOS prompt, a list of all help topics
  3999.               will be displayed.  Move the cursor bar to the topic you want
  4000.               using a mouse or the arrow keys, and press Enter to see help
  4001.               on that topic.
  4002.  
  4003.               If you type HELP followed by a topic on the command line, 4DOS
  4004.               will skip the opening help screen and go directly to that
  4005.               topic.  For example, if you need help with the COPY command,
  4006.               you can type:
  4007.  
  4008.                    help copy
  4009.  
  4010.               If you press F1 at the 4DOS prompt, 4DOS will display the list
  4011.               of all help topics just as if you had entered the HELP
  4012.               command.  If you have already typed part or all of a command
  4013.               on the line, 4DOS will provide "context-sensitive" help by
  4014.               using the first word on the line as a help topic.  If it's a
  4015.               valid topic, you will see help for that topic automatically;
  4016.               if not, you will see the list of all help topics and you can
  4017.               pick the topic you want.  For example, if you press F1 after
  4018.               entering each of the command lines shown below you will get
  4019.               the display indicated:
  4020.  
  4021.                    c:\>                      List of help topics
  4022.                    c:\> copy *.* a:          Help on COPY
  4023.                    c:\> c:\util\map          List of help topics
  4024.  
  4025.               If you type the name of any 4DOS internal command at the 4DOS
  4026.               prompt, followed by a slash and a question mark [/?] like
  4027.               this:
  4028.  
  4029.                    copy /?
  4030.  
  4031.  
  4032.  
  4033.           ___________________________________________________________________
  4034.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  63
  4035.  
  4036.                                                        CHAPTER 5 / USING 4DOS
  4037.           ___________________________________________________________________
  4038.  
  4039.  
  4040.  
  4041.               then 4DOS will display help for the command in a "quick-
  4042.               reference" style.  Output from a /? display may be redirected
  4043.               with > or >>.  The /? option may not work correctly if you
  4044.               have redefined how the command operates with an alias.  In
  4045.               this case you may need to add an asterisk to the beginning of
  4046.               the command to prevent 4DOS from processing the alias:
  4047.  
  4048.                    alias copy copy /r
  4049.                    *copy /?
  4050.  
  4051.               /? will only access the 4DOS help system when you use it with
  4052.               a 4DOS internal command.  If you use it with an external
  4053.               command name, the external command will be executed and will
  4054.               interpret the /? parameter according to its own rules.  Some
  4055.               external commands, including MS-DOS 5.0 external utility
  4056.               programs,  do display help when run with a /? parameter, but
  4057.               this a characteristic of these commands and does not depend on
  4058.               4DOS.  Many other external commands do not have this feature.
  4059.  
  4060.               Once you've started the 4DOS help system with HELP or F1, you
  4061.               can use a standard set of keystrokes to navigate.  The table
  4062.               below gives a brief summary of keys you can use in the help
  4063.               topic list, and in a help text screen; for details see the
  4064.               topic -HELP- in the help system itself.  The -HELP- topic also
  4065.               explains how to use a mouse within the help system.
  4066.  
  4067.               Help topic list keys:
  4068.  
  4069.                     Arrow Keys       Move the highlight to a different
  4070.                                      topic.
  4071.                     Enter            Display help on the highlighted topic.
  4072.                     Esc              Return to 4DOS.
  4073.                     Any other key    Attempt to match the characters typed
  4074.                                      with one of the names in the topic
  4075.                                      list.
  4076.  
  4077.               Help text screen keys:
  4078.  
  4079.                     Up Arrow         Scroll up one line in the display.
  4080.                     Down Arrow       Scroll down one line in the display.
  4081.                     PgUp             Scroll up one page in the display.
  4082.                     PgDn             Scroll down one page in the display.
  4083.                     Left Arrow       Move the cross-reference highlight to
  4084.                                      the previous item.
  4085.                     Right Arrow      Move the cross-reference highlight to
  4086.                                      the next item.
  4087.  
  4088.  
  4089.  
  4090.           ___________________________________________________________________
  4091.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  64
  4092.  
  4093.                                                        CHAPTER 5 / USING 4DOS
  4094.           ___________________________________________________________________
  4095.  
  4096.  
  4097.                     Enter            Switch to the topic shown by the
  4098.                                      highlighted cross-reference item.
  4099.                     Esc              Return to the topic list, or back to
  4100.                                      4DOS if this topic was displayed
  4101.                                      directly without using the topic list.
  4102.                     F1               Go to the topic list in order to select
  4103.                                      a new topic.
  4104.                     Alt-N
  4105.                       or Ctrl-Right  View the next topic in the topic list.
  4106.                     Alt-P
  4107.                       or Ctrl-Left   View the previous topic in the topic
  4108.                                      list.
  4109.                     Alt-F1           View the previously displayed topic.
  4110.                     Alt-X            Return directly to 4DOS without
  4111.                                      restoring the original screen contents.
  4112.                     Ctrl-P           Print the text for the current topic on
  4113.                                      LPT1.
  4114.  
  4115.               The help system normally restores the screen when exiting.
  4116.               Use Alt-X to leave a page of help text on the screen so you
  4117.               can refer to it.  You can use Ctrl-P to print the topic you
  4118.               are viewing.  Your printer must be turned on and ready before
  4119.               pressing Ctrl-P.
  4120.  
  4121.  
  4122.           Input and Output
  4123.  
  4124.               4DOS commands and many programs get their input from the
  4125.               computer's standard input device and send their output to the
  4126.               standard output device.  Some programs also send special
  4127.               messages to the standard error device.  Normally, the keyboard
  4128.               is used for standard input and the video screen for both
  4129.               standard output and standard error.  But you can temporarily
  4130.               change these devices for special tasks.
  4131.  
  4132.               For example, suppose you want a printed list of the files in a
  4133.               directory.  If you change the standard output to the printer
  4134.               and issue a DIR command, the task is easy.  DIR prints to
  4135.               standard output, and you have redirected standard output to
  4136.               the printer, so the DIR command prints filenames instead of
  4137.               displaying them on the screen.  You can just as easily send
  4138.               the output of DIR (or any other command) to a file or a serial
  4139.               port.
  4140.  
  4141.               4DOS has three methods of manipulating input and output:
  4142.               Redirection, Piping, and the Keystack.  All three are
  4143.               explained in this section.
  4144.  
  4145.  
  4146.  
  4147.           ___________________________________________________________________
  4148.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  65
  4149.  
  4150.                                                        CHAPTER 5 / USING 4DOS
  4151.           ___________________________________________________________________
  4152.  
  4153.  
  4154.  
  4155.               Redirection and piping affect the standard input, standard
  4156.               output, and standard error devices.  They do not work with
  4157.               application programs which read the keyboard hardware
  4158.               directly, or which write directly to the screen.
  4159.  
  4160.  
  4161.               Redirection
  4162.  
  4163.               Redirection replaces standard input, standard output, and
  4164.               standard error with another device like the printer or serial
  4165.               port, or with a file.  The redirection lasts for one command
  4166.               and then everything returns to normal.  You have to use some
  4167.               discretion when you use redirection with a device;  there is
  4168.               no way to get input from the printer, for example.
  4169.  
  4170.               In the descriptions below, filename means either the name of a
  4171.               file or of an appropriate device (PRN, LPT1, LPT2, or LPT3 for
  4172.               printers; COM1 to COM4 for serial ports; CON for the keyboard
  4173.               and screen; etc.).
  4174.  
  4175.               To use redirection, place the redirection symbol and filename
  4176.               at the end of the command line, after the command name and any
  4177.               parameters.  For example, to redirect the output of the DIR
  4178.               command to a file called DIRLIST, you could use a command line
  4179.               like this:
  4180.  
  4181.                    c:\> dir /b1 *.dat > dirlist
  4182.  
  4183.               You can use both input and output redirection for the same
  4184.               command, if both are appropriate:
  4185.  
  4186.                    c:\> sort < dirlist > dirlist.srt
  4187.  
  4188.               Here are the redirection options supported by 4DOS:
  4189.  
  4190.                    To get input from a file or device instead of from the
  4191.                    keyboard:
  4192.  
  4193.                         < filename
  4194.  
  4195.                    To redirect standard output to a file or device:
  4196.  
  4197.                         > filename
  4198.  
  4199.                    To redirect standard output and standard error to a file
  4200.                    or device:
  4201.  
  4202.  
  4203.  
  4204.           ___________________________________________________________________
  4205.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  66
  4206.  
  4207.                                                        CHAPTER 5 / USING 4DOS
  4208.           ___________________________________________________________________
  4209.  
  4210.  
  4211.  
  4212.                         >& filename
  4213.  
  4214.                    To redirect standard error only to a file or device:
  4215.  
  4216.                         >&> filename
  4217.  
  4218.               If you want to append output to the end of a file, replace the
  4219.               first ">" in the last three commands above with ">>" (use >>,
  4220.               >>&, and >>&>).
  4221.  
  4222.            ## When output is directed to a file with >, >&, or >&>, if the
  4223.               file already exists, it will be overwritten.  You can protect
  4224.               existing files by using the SETDOS /N1 command (see page 301)
  4225.               or the NoClobber directive in 4DOS.INI (see page 131).
  4226.  
  4227.            ## When output is appended to a file with >>, >>&, or >>&>, the
  4228.               file will be created if it doesn't already exist.  Setting
  4229.               NoClobber will also prevent the creation of a new file.  You
  4230.               can temporarily override the current setting of NoClobber by
  4231.               using an exclamation mark [!] after the redirection symbol.
  4232.               For example, to redirect the output of DIR to the file DIROUT,
  4233.               and allow overwriting of any existing file despite the
  4234.               NoClobber setting:
  4235.  
  4236.                    c:\> dir >! dirout
  4237.  
  4238.            ## 4DOS redirection is fully nestable.  For example, you can
  4239.               invoke a batch file and redirect all of its output to a file
  4240.               or device.  Output redirection on a command within the batch
  4241.               file will take effect for that command only; when the command
  4242.               is completed, output will revert to the redirected output file
  4243.               or device in use for the batch file as a whole.
  4244.  
  4245.            ## For another method of changing the standard input and output
  4246.               devices see CTTY on page 204.
  4247.  
  4248.  
  4249.               Piping
  4250.  
  4251.               You can also create a "pipe," which means sending the standard
  4252.               output of one command to the standard input of another
  4253.               command.  To send the standard output of command1 to the
  4254.               standard input of command2:
  4255.  
  4256.                    command1 | command2
  4257.  
  4258.  
  4259.  
  4260.  
  4261.           ___________________________________________________________________
  4262.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  67
  4263.  
  4264.                                                        CHAPTER 5 / USING 4DOS
  4265.           ___________________________________________________________________
  4266.  
  4267.  
  4268.  
  4269.               To send the standard output and standard error of command1 to
  4270.               the standard input of command2:
  4271.  
  4272.                    command1 |& command2
  4273.  
  4274.               For example, to take the output of the SET command (which
  4275.               displays a list of your environment variables and their
  4276.               values) and pipe it to the DOS SORT utility to generate a
  4277.               sorted list, you would use the command:
  4278.  
  4279.                    c:\> set | sort
  4280.  
  4281.               To do the same thing and then pipe the sorted list to 4DOS's
  4282.               LIST command for full-screen viewing (see page 262):
  4283.  
  4284.                    c:\> set | sort | list /s
  4285.  
  4286.            ## 4DOS creates one or two temporary files to hold the output of
  4287.               pipes.  The files are named P1.$00 and P2.$00.  By default,
  4288.               these files are stored in the root directory of the boot
  4289.               drive, but you can override this with either the TEMP4DOS or
  4290.               TEMP environment variable (see page 116).  The last character
  4291.               of the extension will change with the shell nesting level (0
  4292.               for the primary shell, 1 for the first secondary shell, and so
  4293.               on).
  4294.  
  4295.            ## The 4DOS commands TEE and Y (see pages 308 and 322) are "pipe
  4296.               fittings" which add more flexibility to pipes.
  4297.  
  4298.  
  4299.               Keystack
  4300.  
  4301.               The 4DOS Keystack overcomes two weaknesses of input
  4302.               redirection: many programs ignore standard input and read the
  4303.               keyboard directly, and input redirection doesn't end until the
  4304.               program or command terminates.  You can't, for example, use
  4305.               redirection to send the opening commands to a program and then
  4306.               type the rest of the commands yourself.  But the Keystack lets
  4307.               you do exactly that.
  4308.  
  4309.               The 4DOS Keystack, which is often used in batch files and
  4310.               aliases, sends keystrokes to an application program.  Once the
  4311.               Keystack is empty, the program will receive the rest of its
  4312.               input from the keyboard.  The Keystack is useful when you want
  4313.               a program to take certain actions automatically when it
  4314.               starts.
  4315.  
  4316.  
  4317.  
  4318.           ___________________________________________________________________
  4319.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  68
  4320.  
  4321.                                                        CHAPTER 5 / USING 4DOS
  4322.           ___________________________________________________________________
  4323.  
  4324.  
  4325.  
  4326.               The Keystack is invoked with the KEYSTACK command (see page
  4327.               257).  It depends on a small resident program called
  4328.               KSTACK.COM, which must be installed in your AUTOEXEC.BAT file
  4329.               (see page 116).  If you don't have KSTACK.COM installed, the
  4330.               KEYSTACK command will display an error message.  If you are
  4331.               using a multitasking system such as DESQview or Windows, see
  4332.               page 155 for information on loading KSTACK within a window.
  4333.  
  4334.               To place the letters, digits, and punctuation marks you would
  4335.               normally type for your program into the keystack, enclose them
  4336.               in double quotes:
  4337.  
  4338.                    c:\> keystack "myfile"
  4339.  
  4340.               Many other keys can be entered into the Keystack using their
  4341.               names.  This example puts the F1 key followed by the Enter key
  4342.               in the keystack:
  4343.  
  4344.                    c:\> keystack F1 Enter
  4345.  
  4346.               See the KEYSTACK command for details on how key names are
  4347.               entered and on using numeric key values along with or instead
  4348.               of key names.
  4349.  
  4350.               Some programs may require a delay between keystrokes.  You can
  4351.               insert a delay with the /W option, followed by a delay time in
  4352.               1/18-seconds.  To add a 1-second delay between the keystrokes
  4353.               in the previous example:
  4354.  
  4355.                    c:\> keystack F1 /W18 Enter
  4356.  
  4357.               Some programs clear all keystrokes from the keyboard buffer
  4358.               and then accept input.  Place a 0 (zero) in the keystack to
  4359.               tell such programs that the keyboard buffer is empty.  This
  4360.               example reports an empty keyboard buffer and then types
  4361.               myfile:
  4362.  
  4363.                    c:\> keystack 0 "myfile"
  4364.  
  4365.               Some programs require both the ASCII code and the key's scan
  4366.               code.  To put both together in the Keystack, multiply the scan
  4367.               code by  256, add the ASCII code, and use the resulting
  4368.               numeric value as an argument to KEYSTACK.  For example, the
  4369.               Enter key has a scan code of 28 and an ASCII code of 13.  The
  4370.               combined code is (28 * 256) + 13 = 7181.  To put the combined
  4371.               code for the Enter key on the keystack:
  4372.  
  4373.  
  4374.  
  4375.           ___________________________________________________________________
  4376.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  69
  4377.  
  4378.                                                        CHAPTER 5 / USING 4DOS
  4379.           ___________________________________________________________________
  4380.  
  4381.  
  4382.  
  4383.                    c:\> keystack 7181
  4384.  
  4385.               If a program has different uses for the similar keys on the
  4386.               regular keyboard and the numeric keypad, it will need combined
  4387.               codes.
  4388.  
  4389.               The following command creates an alias (see page 174) that
  4390.               will run a dBASE report called TIMEREP (it should be entered
  4391.               on one line):
  4392.  
  4393.                    c:\> alias drpt `keystack "use times index times" Enter
  4394.                         "report form timerep to print" Enter "quit" Enter
  4395.                          ^ dbase`
  4396.  
  4397.               This command creates an alias called DRPT which puts the
  4398.               following characters on the keystack:
  4399.  
  4400.                    the characters "use times index times"
  4401.                    the Enter key's code
  4402.                    the characters "report form timerep to print"
  4403.                    the Enter key's code
  4404.                    the characters "quit"
  4405.                    and one more Enter key
  4406.  
  4407.               The alias then runs the program dBASE which receives those
  4408.               characters just as if you had typed them.
  4409.  
  4410.               You may have to experiment with some programs to find the
  4411.               proper sequence of keystrokes.  Programs which bypass both DOS
  4412.               and the computer's BIOS, and read keystrokes directly from the
  4413.               keyboard hardware, will not accept input from the 4DOS
  4414.               Keystack.  Few programs fit into this category except memory-
  4415.               resident utilities.
  4416.  
  4417.               When you use the Keystack, remember that you must put the
  4418.               keystrokes into the Keystack before you run the program that
  4419.               will receive them.  The Keystack will hold the keystrokes
  4420.               until a program asks for them.
  4421.  
  4422.               See Appendix B on page 334 for a complete list of ASCII,
  4423.               extended key, and scan codes, and KEYSTACK on page 257 for
  4424.               more information.
  4425.  
  4426.  
  4427.  
  4428.  
  4429.  
  4430.  
  4431.  
  4432.           ___________________________________________________________________
  4433.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  70
  4434.  
  4435.                                                        CHAPTER 5 / USING 4DOS
  4436.           ___________________________________________________________________
  4437.  
  4438.  
  4439.  
  4440.  
  4441.           File Processing
  4442.  
  4443.               Most 4DOS commands (like COPY, DIR, etc.) and many external
  4444.               commands work on a file or a group of files.  Besides typing
  4445.               the exact name of the file you want to work with, you can use
  4446.               4DOS's shorthand forms of naming files:  Extended Parent
  4447.               Directory Names, Wildcards, Multiple Filenames, Include Lists,
  4448.               and Executable Extensions.  These four features are explained
  4449.               in this section.
  4450.  
  4451.               These features apply to 4DOS commands only, and generally can
  4452.               not be used to pass file names to external programs.  For
  4453.               example, 4DOS can understand the file name ...\FILE.DAT when
  4454.               it is used in an internal 4DOS command like COPY or MOVE.
  4455.               However your editor probably was not designed to support this
  4456.               extension to traditional DOS directory names, and is likely to
  4457.               give an error message if you try to pass it such a name.
  4458.  
  4459.               Remember throughout this section that a filename is a base
  4460.               name of 1 to 8 characters, optionally followed by an extension
  4461.               which is a period [.] and 1 to 3 more characters.
  4462.  
  4463.  
  4464.               Extended Parent Directory Names
  4465.  
  4466.               4DOS allows you to extend the traditional DOS ".." syntax for
  4467.               naming the parent directory, by adding additional [.]
  4468.               characters.  Each additional [.] represents an additional
  4469.               directory level above the current directory.  For example, to
  4470.               copy the file LETTERS.DAT from the directory C:\DATA to drive
  4471.               A:, while you are in a directory further down in the directory
  4472.               tree:
  4473.  
  4474.                    C:\DATA\FINANCE\JANUARY>copy ...\LETTERS.DAT A:
  4475.  
  4476.  
  4477.               Wildcards
  4478.  
  4479.               Wildcards let you specify a file or group of files by typing a
  4480.               partial filename.  4DOS scans the appropriate directory to
  4481.               find all of the files that match the partial name you have
  4482.               specified.
  4483.  
  4484.               Most 4DOS commands accept filenames with wildcards anywhere
  4485.               that a full filename can be used.  4DOS recognizes 2 wildcard
  4486.               characters, the asterisk [*] and the question mark [?], plus a
  4487.  
  4488.  
  4489.           ___________________________________________________________________
  4490.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  71
  4491.  
  4492.                                                        CHAPTER 5 / USING 4DOS
  4493.           ___________________________________________________________________
  4494.  
  4495.  
  4496.               special method of specifying a range of permissible
  4497.               characters.
  4498.  
  4499.               An asterisk [*] in a filename means "any zero or more
  4500.               characters in this position."  For example, this command will
  4501.               display a list of all files in the current directory,
  4502.               regardless of the length of each file's name:
  4503.  
  4504.                    c:\> dir *.*
  4505.  
  4506.               If you want to see all of the files with a .TXT extension, you
  4507.               could type this:
  4508.  
  4509.                    c:\> dir *.txt
  4510.  
  4511.               If you know that the file you are looking for has a base name
  4512.               that begins with ST and an extension that begins with .D, you
  4513.               can find it this way.  Filenames such as STATE.DAT,
  4514.               STEVEN.DOC, and ST.D will all be displayed:
  4515.  
  4516.                    c:\> dir st*.d*
  4517.  
  4518.               With 4DOS, you can also use the asterisk to match filenames
  4519.               with specific letters somewhere inside the name.  The
  4520.               following example will display any file with a .TXT extension
  4521.               that has the letters AM together anywhere inside its base
  4522.               name.  It will, for example, display AMPLE.TXT, STAMP.TXT,
  4523.               CLAM.TXT, and AM.TXT:
  4524.  
  4525.                    c:\> dir *am*.txt
  4526.  
  4527.               A question mark [?] matches any single filename character.
  4528.               Also, DOS automatically extends all base names to 8 characters
  4529.               and all extensions to 3 characters by adding blanks at the end
  4530.               of the names, if necessary.  The question mark wildcard will
  4531.               match one of these blanks as well as a normal character.  For
  4532.               example, if you have files called LETTER.DOC, LETTER1.DOC, and
  4533.               LETTERA.DOC, this command will display all three names:
  4534.  
  4535.                    c:\> dir letter?.doc
  4536.  
  4537.               You can put the question mark anywhere in a filename and use
  4538.               as many question marks as you need.  The following example
  4539.               will display files with names like LETTER.DOC and LATTER.DAT,
  4540.               and LITTER.DU:
  4541.  
  4542.                    c:\> dir l?tter.d??
  4543.  
  4544.  
  4545.  
  4546.           ___________________________________________________________________
  4547.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  72
  4548.  
  4549.                                                        CHAPTER 5 / USING 4DOS
  4550.           ___________________________________________________________________
  4551.  
  4552.  
  4553.  
  4554.               The use of an asterisk wildcard before other characters, and
  4555.               of the character ranges discussed below, is unique to 4DOS.
  4556.               These wildcards work only with 4DOS internal commands, not
  4557.               with external programs that accept file names and wildcards,
  4558.               unless such programs have been written especially to parallel
  4559.               4DOS's features.
  4560.  
  4561.            ## In some cases, the question mark wildcard may be too general.
  4562.               You can also tell 4DOS what characters you want to accept (or
  4563.               exclude) in a particular position in the filename by using
  4564.               square brackets.  Inside the brackets, you can put the
  4565.               individual acceptable characters or ranges of characters.  For
  4566.               example, if you wanted to match LETTER0.DOC through
  4567.               LETTER9.DOC, you could use this command:
  4568.  
  4569.                    c:\> dir letter[0-9].doc
  4570.  
  4571.               You could find all files that have a vowel as the second
  4572.               letter in their name this way.  This example also demonstrates
  4573.               how to mix the wildcard characters:
  4574.  
  4575.                    c:\> dir ?[aeiouy]*.*
  4576.  
  4577.               You can exclude a group of characters or a range of characters
  4578.               by using an exclamation mark [!] as the first character inside
  4579.               the brackets.  This example displays all filenames that are at
  4580.               least 2 characters long except those which have a vowel as the
  4581.               second letter in their names:
  4582.  
  4583.                    c:\> dir ?[!aeiouy]*.*
  4584.  
  4585.               The next example, which selects files such as AIP, BIP, and
  4586.               TIP but not NIP, demonstrates how you can use multiple ranges
  4587.               inside the brackets.  It will accept a file that begins with
  4588.               an A, B, C, D, T, U, or V:
  4589.  
  4590.                    c:\> dir [a-dt-v]ip
  4591.  
  4592.            ## You may use a question mark character inside the brackets, but
  4593.               its meaning is slightly different than a normal (unbracketted)
  4594.               question mark wildcard.  A normal question mark wildcard
  4595.               matches any character or an implied blank at the end of a name
  4596.               or extension.  4DOS will match a question mark inside brackets
  4597.               with any character but not with an implied blank.  For
  4598.               example,
  4599.  
  4600.                    c:\> dir letter[?].doc
  4601.  
  4602.  
  4603.           ___________________________________________________________________
  4604.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  73
  4605.  
  4606.                                                        CHAPTER 5 / USING 4DOS
  4607.           ___________________________________________________________________
  4608.  
  4609.  
  4610.  
  4611.               will display LETTER1.DOC and LETTERA.DOC, but not LETTER.DOC.
  4612.  
  4613.            ## You can repeat any of the wildcard characters in any
  4614.               combination you desire within a single file name.  For
  4615.               example, the following command lists all files which have an
  4616.               A, B, or C as the third character, followed by zero or more
  4617.               additional characters, followed by a D, E, or F, followed
  4618.               optionally by some additional characters, and with an
  4619.               extension beginning with P or Q.  You probably won't need to
  4620.               do anything this complex, but we've included it to show you
  4621.               the flexibility of 4DOS wildcards:
  4622.  
  4623.                    c:\> dir ??[abc]*[def]*.[pq]*
  4624.  
  4625.  
  4626.               Multiple Filenames
  4627.  
  4628.               Most 4DOS file processing commands can work with multiple
  4629.               files at one time.  To use multiple file names, you simply
  4630.               list the files one after another on the command line,
  4631.               separated by spaces.  You can use wildcards in any or all of
  4632.               the filenames.  For example, to copy all .TXT  and .DOC files
  4633.               from the current directory to drive A, you could use this
  4634.               command:
  4635.  
  4636.                    c:\> copy *.txt *.doc a:
  4637.  
  4638.               If the files you want to work with are not in the default
  4639.               directory, you must include the full path with each filename:
  4640.  
  4641.                    c:\> copy a:\details\file1.txt a:\details\file1.doc c:
  4642.  
  4643.             ! Multiple filenames are handy when you want to match a group of
  4644.               files which cannot be defined with a single filename and
  4645.               wildcards.  They let you be very specific about which files
  4646.               you want to work with in a command.  When you use multiple
  4647.               filenames with a command that expects both a source and a
  4648.               destination, like COPY or MOVE, be sure that you always
  4649.               include a specific destination on the command line.  If you
  4650.               don't, the command will assume that the last filename is the
  4651.               destination and may overwrite important files.
  4652.  
  4653.               Like extended wildcards and include lists (see below), the
  4654.               4DOS multiple filename feature will work with internal 4DOS
  4655.               commands but not with external programs unless those programs
  4656.               have been written to handle multiple file names on the command
  4657.               line.
  4658.  
  4659.  
  4660.           ___________________________________________________________________
  4661.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  74
  4662.  
  4663.                                                        CHAPTER 5 / USING 4DOS
  4664.           ___________________________________________________________________
  4665.  
  4666.  
  4667.  
  4668.               If you have a list of files to process that's too long to put
  4669.               on the command line or too time-consuming to type, see the
  4670.               SELECT command on page 293 for another way of passing multiple
  4671.               file names to a command.
  4672.  
  4673.  
  4674.               Include Lists
  4675.  
  4676.               Any 4DOS command that accepts multiple filenames can also
  4677.               accept one or more include lists.  An include list is simply a
  4678.               group of filenames, with or without wildcards, separated by
  4679.               semi-colons [;].  All files in the include list must be in the
  4680.               same directory.  You may not add a space on either side of the
  4681.               semi-colon.
  4682.  
  4683.               If you used an include list instead of multiple file names for
  4684.               the previous examples, they would look like this:
  4685.  
  4686.                    c:\> copy *.txt;*.doc a:
  4687.                    c:\> copy a:\details\*.txt;*.doc c:
  4688.  
  4689.               Include lists are similar to multiple filenames, but have
  4690.               three important differences.  First, you don't have to repeat
  4691.               the path to your files if you use an include list, because all
  4692.               of the included files must be in the same directory.  Second,
  4693.               if you use include lists, you aren't as likely to accidentally
  4694.               overwrite files if you forget a destination path for commands
  4695.               like COPY, because the last name in the list will be part of
  4696.               the include list, and won't be seen as the destination file
  4697.               name.  Include lists can only be used as the source parameter
  4698.               (the location files are coming from) for COPY and other
  4699.               similar commands.  They cannot be used to specify a
  4700.               destination for files.
  4701.  
  4702.               Third, multiple filenames and include lists are processed
  4703.               differently by the 4DOS DIR and SELECT commands.  If you use
  4704.               multiple filenames, all of the files matching the first
  4705.               filename are processed, then all of the files matching the
  4706.               second name, and so on.  When you use an include list, all
  4707.               files that match any entry in the include list are processed
  4708.               together, and will appear together in the directory display or
  4709.               SELECT list.  You can see this difference most clearly if you
  4710.               experiment with both techniques and the DIR command.  For
  4711.               example,
  4712.  
  4713.                    c:\> dir *.txt *.doc
  4714.  
  4715.  
  4716.  
  4717.           ___________________________________________________________________
  4718.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  75
  4719.  
  4720.                                                        CHAPTER 5 / USING 4DOS
  4721.           ___________________________________________________________________
  4722.  
  4723.  
  4724.  
  4725.               will list all the .TXT files with a directory header, the file
  4726.               list, and a summary of the total number of files and bytes
  4727.               used.  Then it will do the same for the .DOC files.  However,
  4728.  
  4729.                    c:\> dir *.txt;*.doc
  4730.  
  4731.               will display all the files in one list.
  4732.  
  4733.               Like extended wildcards and multiple filenames (see above),
  4734.               the 4DOS include list feature will work with internal 4DOS
  4735.               commands but not with external programs unless they have been
  4736.               programmed especially to parallel 4DOS's features.
  4737.  
  4738.  
  4739.               Executable Extensions
  4740.  
  4741.               Normally, when you type a filename (as opposed to an alias or
  4742.               internal command name) as the first word on the command line,
  4743.               4DOS looks for a .COM, .EXE, .BTM, or .BAT file with that name
  4744.               to execute (.COM and .EXE files are executable programs; .BTM
  4745.               and .BAT files are batch files).  You can add to this list of
  4746.               extensions and have 4DOS take the actions you want with files
  4747.               that have other extensions as well.  You could have 4DOS start
  4748.               your text editor whenever you type the name of a .DOC file, or
  4749.               start your database manager whenever you type the name of a
  4750.               .DAT file.
  4751.  
  4752.               4DOS uses environment variables to define what program or
  4753.               batch file to run for each defined file extension.  To create
  4754.               an executable extension, you use the SET command to create a
  4755.               new environment variable.
  4756.  
  4757.               For example, if you want to run a word processor called EDITOR
  4758.               whenever you type the name of a file that has an extension of
  4759.               .EDT, you could use this command:
  4760.  
  4761.                    c:\> set .edt=c:\edit\editor.exe
  4762.  
  4763.               The syntax for creating an executable extension is
  4764.  
  4765.                    set .ext=d:\path\program [options]
  4766.  
  4767.               where .EXT is the executable file extension, D:\PATH\PROGRAM
  4768.               is the full name of the program or batch file to run, and
  4769.               [options] are any command-line startup options you want to
  4770.               specify for the program.  The pathname is optional if the
  4771.               program is in a directory on your PATH.  The program to run
  4772.  
  4773.  
  4774.           ___________________________________________________________________
  4775.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  76
  4776.  
  4777.                                                        CHAPTER 5 / USING 4DOS
  4778.           ___________________________________________________________________
  4779.  
  4780.  
  4781.               must be a .COM, .EXE, .BTM, or .BAT file or an internal
  4782.               command.  It cannot be an alias.
  4783.  
  4784.               The following example defines BASICA.COM as the processor for
  4785.               .BAS files:
  4786.  
  4787.                    c:\> set .bas=c:\dos\basica.com
  4788.  
  4789.               With this definition, if you have a file named PUSHCART.BAS in
  4790.               the current directory and enter the command:
  4791.  
  4792.                    c:\> pushcart
  4793.  
  4794.               4DOS will execute the command:
  4795.  
  4796.                    c:\dos\basica.com pushcart
  4797.  
  4798.               The next example defines B.EXE (the Brief text editor) as the
  4799.               processor for .C files:
  4800.  
  4801.                    c:\> set .c=c:\brief\b.exe -Mxyz
  4802.  
  4803.               Now, if you have a file called HELLO.C and enter the command
  4804.  
  4805.                    c:\> hello -i30
  4806.  
  4807.               4DOS will expand the command line and execute this command:
  4808.  
  4809.                    c:\brief\b.exe -Mxyz hello.c -i30
  4810.  
  4811.               Notice that 4DOS inserts the value of the environment variable
  4812.               at the beginning of the line, including any options, then
  4813.               appends the original file name plus its extension, and then
  4814.               the remainder of the original command line.
  4815.  
  4816.               If the program you want to run doesn't accept a file name on
  4817.               its command line as shown in these examples, then executable
  4818.               extensions won't work with that program.
  4819.  
  4820.            ## 4DOS searches for executable commands in the following order:
  4821.               .COM, .EXE, .BTM, .BAT, and executable extensions in the order
  4822.               they appear in the environment.  It first searches the current
  4823.               directory, and then each subdirectory specified by the PATH
  4824.               environment variable (if a "." is used in the PATH the current
  4825.               directory is not searched first; see the PATH command on page
  4826.               274 for details).  4DOS recognizes environment variables as
  4827.               executable extensions if they begin with a period followed by
  4828.               1 to 3 valid filename characters.
  4829.  
  4830.  
  4831.           ___________________________________________________________________
  4832.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  77
  4833.  
  4834.                                                        CHAPTER 5 / USING 4DOS
  4835.           ___________________________________________________________________
  4836.  
  4837.  
  4838.  
  4839.               You may need to take this search order into account when using
  4840.               executable extensions.  Using the .BAS example above, if you
  4841.               had a file FORMAT.BAS in the current directory and entered the
  4842.               command FORMAT A:, 4DOS would run the BASIC interpreter
  4843.               specified by the executable extension, instead of finding the
  4844.               standard DOS FORMAT command as you intended.  You can get
  4845.               around this by remembering that the DOS FORMAT command is in
  4846.               the file FORMAT.COM.  If you entered the command FORMAT.COM A:
  4847.               then 4DOS would not find a match for the executable extension,
  4848.               and would continue the usual search sequence until it found
  4849.               the FORMAT command.
  4850.  
  4851.            ## Executable extensions may include wildcards, so you could, for
  4852.               example, have 4DOS run your text editor for any file with an
  4853.               extension beginning with T by defining an executable extension
  4854.               called .T*.  Extended wildcards (e.g. "DO[CT]" for .DOC and
  4855.               .DOT files) may also be used.
  4856.  
  4857.  
  4858.           The Environment
  4859.  
  4860.               The environment is a collection of information about your
  4861.               computer that every program receives.  You can view the
  4862.               environment by typing SET, and modify it with the ESET, SET,
  4863.               and UNSET commands (see pages 226, 298, and 316).
  4864.  
  4865.               Each entry in the environment consists of a variable name
  4866.               (usually in upper case) followed by an equal sign and a string
  4867.               of text.  Some variables are of general use to many programs;
  4868.               some are used only by one program or group of programs.  The
  4869.               content and form of the text string following the equal sign
  4870.               is defined by the program that uses each particular
  4871.               environment variable.  The text strings can be used from the
  4872.               4DOS command line, by application programs, and within aliases
  4873.               and batch files.
  4874.  
  4875.               The text string can include any characters except nulls (ASCII
  4876.               0).  The maximum length for the variable name, equal sign, and
  4877.               text string is 255 characters.
  4878.  
  4879.               4DOS can automatically substitute the text for the variable
  4880.               name in a command.  To create the substitution, include a
  4881.               percent sign [%] and a variable name on the command line or in
  4882.               an alias or batch file.  For example, if you create a variable
  4883.               named BACKUP like this:
  4884.  
  4885.                    c:\> set BACKUP=*.bak;*.bk!;*.bk
  4886.  
  4887.  
  4888.           ___________________________________________________________________
  4889.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  78
  4890.  
  4891.                                                        CHAPTER 5 / USING 4DOS
  4892.           ___________________________________________________________________
  4893.  
  4894.  
  4895.  
  4896.               and then type
  4897.  
  4898.                    c:\> del %BACKUP
  4899.  
  4900.               4DOS will execute the following command:
  4901.  
  4902.                    del *.bak;*.bk!;*.bk
  4903.  
  4904.            ## The variable names you use this way may contain any alphabetic
  4905.               or numeric characters, the underscore character [_], and the
  4906.               dollar sign [$].  You can force 4DOS to accept other
  4907.               characters by including the full variable name in square
  4908.               brackets, like this: %[AB##2].  You can also "nest"
  4909.               environment variables using square brackets.  For example
  4910.               %[%var1] means "the contents of the variable whose name is
  4911.               stored in VAR1".
  4912.  
  4913.            ## If you want to pass a percent sign, or a string beginning with
  4914.               a percent sign, to a command you must use two percent signs in
  4915.               a row.  Otherwise 4DOS will see your single percent sign as
  4916.               the beginning of a variable name, and will not pass it on to
  4917.               the command.  For example, to display the string "We're with
  4918.               you 100%", you would use the command:
  4919.  
  4920.                    echo We're with you 100%%
  4921.  
  4922.            ## If you embed an environment variable in the PROMPT, it must
  4923.               also be preceded by two percent signs, or the prompt text must
  4924.               be enclosed in back-quotes (see page 278 for details).
  4925.  
  4926.            ## Environment variables may be used to contain alias names.
  4927.               Normally 4DOS expands aliases before environment variables.
  4928.               However if you use an environment variable name (with a
  4929.               leading percent sign) as the first word in a command line,
  4930.               4DOS will substitute the variable value for the name, then
  4931.               check for any alias name which may have been included within
  4932.               the variable's value.  For example, the following commands
  4933.               would generate a 2-column directory of the .TXT files:
  4934.  
  4935.                    c:\> alias d2 dir /2
  4936.                    c:\> set cmd=d2
  4937.                    c:\> %cmd *.txt
  4938.  
  4939.            ## The trailing percent sign that was traditionally required for
  4940.               environment variable names is not usually required in 4DOS,
  4941.               which accepts any character that cannot be part of a variable
  4942.  
  4943.  
  4944.  
  4945.           ___________________________________________________________________
  4946.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  79
  4947.  
  4948.                                                        CHAPTER 5 / USING 4DOS
  4949.           ___________________________________________________________________
  4950.  
  4951.  
  4952.               name as the terminator.  However the trailing percent can be
  4953.               used to maintain compatibility.
  4954.  
  4955.               The trailing percent sign is needed if you want to concatenate
  4956.               two variable values.  The following examples show the possible
  4957.               interactions between variables and literal strings.  First,
  4958.               create two environment variables called ONE and TWO this way:
  4959.  
  4960.                    c:\> set ONE=abcd
  4961.                    c:\> set TWO=efgh
  4962.  
  4963.               Now the following combinations produce the output text shown:
  4964.  
  4965.                    %ONE%TWO             abcdTWO   ("%ONE%" + "TWO")
  4966.                    %ONE%TWO%            abcdTWO   ("%ONE%" + "TWO%")
  4967.                    %ONE%%TWO            abcdefgh  ("%ONE%" + "%TWO")
  4968.                    %ONE%%TWO%           abcdefgh  ("%ONE%" + "%TWO%")
  4969.                    %ONE%[TWO]           abcd[TWO] ("%ONE%" + "[TWO]")
  4970.                    %ONE%[TWO]%          abcd[TWO] ("%ONE%" + "[TWO]%")
  4971.                    %[ONE]%TWO           abcdefgh  ("%[ONE]" + "%TWO")
  4972.                    %[ONE]%TWO%          abcdefgh  ("%[ONE]" + "%TWO%")
  4973.  
  4974.  
  4975.               4DOS Configuration Variables
  4976.  
  4977.               The following environment variables have special meanings in
  4978.               4DOS.  Chapter 6 / Options and Fine Tuning (see page 116)
  4979.               explains the details of how to set and use each of them,
  4980.               except COLORDIR which is explained under the DIR and SELECT
  4981.               commands on pages 211 and 293.  You can see the current value
  4982.               of each variable, if it exists, with the SET command.
  4983.  
  4984.                    CDPATH tells 4DOS where to search for directories
  4985.                    specified by the CD and CDD commands and in automatic
  4986.                    directory changes.  _CDPATH can be used as an alternative
  4987.                    to CDPATH if you are using Microsoft Bookshelf, which
  4988.                    uses a CDPATH variable for its own purposes.
  4989.  
  4990.                    CMDLINE is the fully expanded text (up to 255 characters
  4991.                    long) of the currently executing 4DOS command line.  4DOS
  4992.                    sets CMDLINE just before it invokes any .COM, .EXE, .BTM,
  4993.                    or .BAT file.  If a command line is prefaced with an "@"
  4994.                    to prevent echoing (see page 57), 4DOS will not attempt
  4995.                    to put it in CMDLINE, and will remove any old CMDLINE
  4996.                    variable from the environment.  This allows you to
  4997.                    squeeze out the last few bytes of environment space
  4998.                    before loading TSRs by prefacing each TSR command with an
  4999.                    "@".
  5000.  
  5001.  
  5002.           ___________________________________________________________________
  5003.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  80
  5004.  
  5005.                                                        CHAPTER 5 / USING 4DOS
  5006.           ___________________________________________________________________
  5007.  
  5008.  
  5009.  
  5010.                    COLORDIR controls directory display colors used by DIR
  5011.                    and SELECT.
  5012.  
  5013.                    COMSPEC contains the full path and name of 4DOS itself.
  5014.                    COMSPEC is often used by applications which have a "shell
  5015.                    to DOS" feature.
  5016.  
  5017.                    PATH is a list of directories that 4DOS will search for
  5018.                    executable files that aren't in the current directory.
  5019.                    PATH may also be used by some application programs to
  5020.                    find their own files.
  5021.  
  5022.                    PROMPT defines the 4DOS command line prompt.
  5023.  
  5024.                    TEMP specifies the directory where 4DOS should store
  5025.                    temporary pipe files if the TEMP4DOS variable doesn't
  5026.                    exist.  Some other programs also use TEMP to define where
  5027.                    they should place their temporary files.
  5028.  
  5029.                    TEMP4DOS specifies where 4DOS should store temporary pipe
  5030.                    files.
  5031.  
  5032.  
  5033.               ## 4DOS Internal Variables
  5034.  
  5035.               The following variables are not actually stored in the
  5036.               environment, but can be used in commands, aliases, and batch
  5037.               files just like any other environment variable.  The values of
  5038.               these variables are stored internally in 4DOS and cannot be
  5039.               changed with the SET, UNSET, or ESET command.  However, you
  5040.               can override any of these variables by defining a new variable
  5041.               with the same name, which will be stored in the environment.
  5042.  
  5043.               These internal variables are often used in 4DOS batch files
  5044.               and aliases to examine system resources and adjust to the
  5045.               current computer settings.  You can examine the contents of
  5046.               any internal variable from the command line with a command
  5047.               like this:
  5048.  
  5049.                    c:\> echo %variablename
  5050.  
  5051.               In the list below, the possible values for most variables are
  5052.               shown in double quotes for ease of understanding.  The actual
  5053.               values returned by the variables do not include the double
  5054.               quotes.
  5055.  
  5056.  
  5057.  
  5058.  
  5059.           ___________________________________________________________________
  5060.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  81
  5061.  
  5062.                                                        CHAPTER 5 / USING 4DOS
  5063.           ___________________________________________________________________
  5064.  
  5065.  
  5066.  
  5067.               ? contains the exit code of the last external command.  Many
  5068.               programs return a 0 to indicate success and a non-zero value
  5069.               to signal an error.  However, not all programs return an exit
  5070.               code.  If no exit code is returned, the value of %? is
  5071.               undefined.
  5072.  
  5073.               _? contains the exit code of the last internal 4DOS command.
  5074.               It is set to 0 if the command was successful, non-zero if not.
  5075.               You must use or save this value immediately, because it is set
  5076.               by every internal command.
  5077.  
  5078.               _4VER is the current 4DOS version (for example, "4.0").
  5079.  
  5080.               _ALIAS contains the free space in the alias list, in bytes.
  5081.  
  5082.               _ANSI contains "1" if 4DOS's internal flags indicate that
  5083.               ANSI.SYS or a compatible driver is installed; "0" if not.  The
  5084.               internal flags which determine the value of _ANSI depend on
  5085.               the SETDOS /A option (see page 301) and the ANSI directive in
  5086.               4DOS.INI (see page 129), as shown in the table below.  If
  5087.               SETDOS /A is 0 or ANSI  is set to Auto, 4DOS tests for the
  5088.               presence of an ANSI driver.  Because there is no standard and
  5089.               100% reliable way to detect an ANSI driver, you may need to
  5090.               experiment to see if this variable works properly with your
  5091.               particular driver when 4DOS is allowed to test for its
  5092.               presence.
  5093.  
  5094.                                    ANSI
  5095.                    SETDOS /A       Directive      _ANSI Value
  5096.                    ------------    ------------   ------------
  5097.                     0 (default)    Auto (default) Result of test
  5098.                     1              Yes            1
  5099.                     2              No             0
  5100.  
  5101.               _BATCH is the current batch nesting level.  It is "0" if no
  5102.               batch file is currently being processed.
  5103.  
  5104.               _BG is a string containing the first three characters of the
  5105.               screen background color at the current cursor location (for
  5106.               example, "Bla").
  5107.  
  5108.               _BOOT is the boot drive letter, without a colon.
  5109.  
  5110.               _CODEPAGE is the current code page number (see CHCP on page
  5111.               194).
  5112.  
  5113.  
  5114.  
  5115.  
  5116.           ___________________________________________________________________
  5117.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  82
  5118.  
  5119.                                                        CHAPTER 5 / USING 4DOS
  5120.           ___________________________________________________________________
  5121.  
  5122.  
  5123.  
  5124.               _COLUMN is the current cursor column (for example, "0" for the
  5125.               left side of the screen).
  5126.  
  5127.               _COLUMNS is the current number of screen columns (for example,
  5128.               "80").
  5129.  
  5130.               _CPU is the cpu type, returned as a string:
  5131.  
  5132.                    86     8086 and 8088           286   80286
  5133.                    186    80186 and 80188         386   i386
  5134.                    200    NEC V20 and V30         486   i486
  5135.  
  5136.               _CWD is the current directory in the format d:\pathname.
  5137.  
  5138.               _CWDS has the same value as CWD, except it ends the pathname
  5139.               with a backslash [\].
  5140.  
  5141.               _CWP is the current directory in the format \pathname.
  5142.  
  5143.               _CWPS has the same value as CWP, except it ends the pathname
  5144.               with a backslash [\].
  5145.  
  5146.               _DATE contains the current system date, in the format mm-dd-yy
  5147.               (U.S.), dd-mm-yy (Europe), or yy-mm-dd (Japan).
  5148.  
  5149.               _DISK is the current disk drive, without a colon (for example,
  5150.               "C").
  5151.  
  5152.               _DOS is the operating system type ("DOS" or "OS2").  4DOS
  5153.               always returns "DOS", and 4OS2 always returns "OS2".  This is
  5154.               useful if you have batch files running in both modes.
  5155.  
  5156.               _DOSVER is the current DOS version (for example, "5.0").  In
  5157.               OS/2 DOS sessions the version number will be 10.2 for OS/2
  5158.               1.2, 10.3 for OS/2 1.3, 20.0 for OS/2 2.0, and so on.
  5159.  
  5160.               _DOW is the first three characters of the current day of the
  5161.               week ("Mon", "Tue", "Wed", etc.).
  5162.  
  5163.               _DV is "1" if DESQview is loaded or "0" otherwise.
  5164.  
  5165.               _ENV is the free space in the environment, in bytes.
  5166.  
  5167.               _FG is a string containing the first three letters of the
  5168.               screen foreground color at the current cursor position (for
  5169.               example, "Whi").
  5170.  
  5171.  
  5172.  
  5173.           ___________________________________________________________________
  5174.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  83
  5175.  
  5176.                                                        CHAPTER 5 / USING 4DOS
  5177.           ___________________________________________________________________
  5178.  
  5179.  
  5180.  
  5181.               _LASTDISK is the last valid drive letter, without a colon.
  5182.  
  5183.               _MONITOR is the monitor type ("mono" or "color").
  5184.  
  5185.               _MOUSE is 1 if a Microsoft-compatible mouse driver is loaded,
  5186.               and 0 otherwise.
  5187.  
  5188.               _NDP is the coprocessor type, returned as a string:
  5189.  
  5190.                    0      no coprocessor is installed
  5191.                    87     8087
  5192.                    287    80287
  5193.                    387    80387 or 80486DX
  5194.  
  5195.               _ROW is the current cursor row (for example, "0" for the top
  5196.               of the screen).
  5197.  
  5198.               _ROWS is the current number of screen rows (for example,
  5199.               "25").
  5200.  
  5201.               _SHELL is the current shell nesting level.  The primary shell
  5202.               is level "0", and each subsequent secondary shell increments
  5203.               the level by 1.
  5204.  
  5205.               _TIME contains the current system time in the format hh:mm:ss.
  5206.               The separator character may vary depending upon your country
  5207.               information  (see the CHCP command on page 194).
  5208.  
  5209.               _TRANSIENT is 1 if the current shell is transient (started
  5210.               with a /C), or 0 otherwise.
  5211.  
  5212.               _VIDEO is the video card type ("mono", "cga", "ega", or
  5213.               "vga").
  5214.  
  5215.               _WIN is the current Microsoft Windows mode.  This variable
  5216.               will always be zero except when 4DOS is running under
  5217.               Microsoft Windows:
  5218.  
  5219.                    0       Windows is not running
  5220.                    1       Windows 2
  5221.                    2       Windows 3 in 386 enhanced mode
  5222.                    3       Windows 3 in real or standard mode
  5223.  
  5224.               The _CWD, _CWDS, _CWP, _CWPS, and _DISK variables will return
  5225.               their result in upper or lower case depending on the value of
  5226.               the SETDOS /U switch (see page 301) or the UpperCase directive
  5227.               in 4DOS.INI (see page 132).  The _MONITOR and _VIDEO variables
  5228.  
  5229.  
  5230.           ___________________________________________________________________
  5231.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  84
  5232.  
  5233.                                                        CHAPTER 5 / USING 4DOS
  5234.           ___________________________________________________________________
  5235.  
  5236.  
  5237.               always return lower case.  The _BG, _DOW, and _FG variables
  5238.               return the first letter of the result in upper case and the
  5239.               rest in lower case.
  5240.  
  5241.               You can use these variables in a wide variety of ways
  5242.               depending on your needs.  Here are just a few examples.  Some
  5243.               of these examples rely on the IF command (page 245) or the IFF
  5244.               command (page 251) to test the value of a variable and perform
  5245.               different actions based on that value.
  5246.  
  5247.               In a batch file, set the color based on the video card type:
  5248.  
  5249.                    iff "%_video"=="mono" then
  5250.                      color bright white on black
  5251.                    else
  5252.                      color bright white on blue
  5253.                    endiff
  5254.  
  5255.               Call another batch file if 4DOS is running under DESQview:
  5256.  
  5257.                    if "%_dv" == "1" call dvstart
  5258.  
  5259.               Store the current date and time in a file, then save the
  5260.               output of a DIR command in the same file:
  5261.  
  5262.                    echo Directory as of %_date %_time > dirsave
  5263.                    dir >> dirsave
  5264.  
  5265.               Set up a prompt for the primary shell which displays the time
  5266.               and current directory, and a different one for secondary
  5267.               shells which includes the shell level rather than the time.
  5268.               Also set different background colors for the two shells,
  5269.               without changing the foreground color.  You might use a
  5270.               sequence like this in your 4START file, which is executed each
  5271.               time 4DOS starts:
  5272.  
  5273.                    iff %_shell==0 then
  5274.                      prompt $t $p$g
  5275.                      color %_fg on blue
  5276.                    else
  5277.                      prompt [$z] $p$g
  5278.                      color %_fg on cyan
  5279.                    endiff
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.  
  5287.           ___________________________________________________________________
  5288.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  85
  5289.  
  5290.                                                        CHAPTER 5 / USING 4DOS
  5291.           ___________________________________________________________________
  5292.  
  5293.  
  5294.  
  5295.  
  5296.               ## 4DOS Variable Functions
  5297.  
  5298.               Variable functions are like internal variables, but they take
  5299.               one or more arguments (which can be environment variables or
  5300.               even other variable functions), and they return a value.  Like
  5301.               all environment variables, these variable functions must be
  5302.               preceded by a percent sign in normal use (%@EVAL, %@LEN,
  5303.               etc.).  All variable functions must have square brackets
  5304.               enclosing their argument(s).  If you embed a variable function
  5305.               in the PROMPT it must be preceded by two percent signs, or the
  5306.               prompt text must be enclosed in back-quotes (see page 278 for
  5307.               details).
  5308.  
  5309.               The variable functions are useful in aliases and batch files
  5310.               to check on available system resources, manipulate strings and
  5311.               numbers, and work with filenames.  Some of the variable
  5312.               functions, like @DISKFREE, are shown with "b|k|m" as one of
  5313.               their arguments.  Those functions return a number of bytes,
  5314.               kilobytes, or megabytes based upon a "b|k|m" argument:
  5315.  
  5316.                    b     return the number of bytes
  5317.                    K     return the number of kilobytes (bytes / 1,024)
  5318.                    k     return the number of thousands of bytes (bytes /
  5319.                          1,000)
  5320.                    M     return the number of megabytes (bytes / 1,048,576)
  5321.                    m     return the number of millions of bytes (bytes /
  5322.                          1,000,000)
  5323.  
  5324.               @ALIAS[name]:  Returns the contents of the specified alias as
  5325.               a string, or a null string if the alias doesn't exist.
  5326.  
  5327.               @ASCII[c]:  Returns the numeric value of the specified ASCII
  5328.               character as a string.  For example %@ASCII[A] returns 65.
  5329.               You can put an escape character (Ctrl-X) before the actual
  5330.               character to process.  This allows quotes and other special
  5331.               characters as the argument (eg %@ASCII[^X`]).
  5332.  
  5333.               @ATTRIB[filename,attrib]:  Returns a "1" if the specified file
  5334.               has the matching attribute(s);  otherwise returns a "0".  The
  5335.               attributes are:
  5336.  
  5337.                    N     Normal (no attribute bits set)
  5338.                    R     Read-only
  5339.                    H     Hidden
  5340.                    S     System
  5341.                    D     Directory
  5342.  
  5343.  
  5344.           ___________________________________________________________________
  5345.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  86
  5346.  
  5347.                                                        CHAPTER 5 / USING 4DOS
  5348.           ___________________________________________________________________
  5349.  
  5350.  
  5351.                    A     Archive
  5352.  
  5353.               The attributes (other than N) can be combined;  ATTRIB will
  5354.               only return a 1 if all the attributes match.
  5355.  
  5356.               @CHAR[n]:  Returns the character corresponding to an ASCII
  5357.               numeric value.  For example %@CHAR[65] returns A.
  5358.  
  5359.               @DATE[mm-dd-yy]:  Returns the number of days since January 1,
  5360.               1980 for the specified date.  DATE uses the date format
  5361.               mandated by your country code (dd-mm-yy in Europe;  yy-mm-dd
  5362.               in Japan).
  5363.  
  5364.               @DESCRIPT[filename]:  Returns the file description for the
  5365.               specified filename (see the DESCRIBE command on page 209).
  5366.  
  5367.               @DEVICE[name]:  Returns 1 if the specified name is a character
  5368.               device (such as a printer or serial port), or 0 if not.
  5369.  
  5370.               @DISKFREE[d:,b|k|m]: Returns the amount of free disk space on
  5371.               the specified drive.
  5372.  
  5373.               @DISKTOTAL[d:,b|k|m]: Returns the total disk space on the
  5374.               specified drive.
  5375.  
  5376.               @DISKUSED[d:,b|k|m]: Returns the amount of disk space in use
  5377.               by files and directories on the specified drive.
  5378.  
  5379.               @DOSMEM[b|k|m]:  Returns the amount of free base memory.
  5380.  
  5381.               @EMS[b|k|m]:  Returns the amount of free EMS memory.
  5382.  
  5383.               @EVAL[expression]:  Evaluates an arithmetic expression.  @EVAL
  5384.               supports addition (+), subtraction (-), multiplication (*),
  5385.               division (/), and modulo (%%).  The expression can contain
  5386.               environment variables and other variable functions.  @EVAL
  5387.               also supports parentheses, commas, and decimal places.
  5388.               Parentheses can be nested.  The maximum number size is 16
  5389.               digits to the left of the decimal point and 8 digits to the
  5390.               right of the decimal point.  @EVAL will strip leading and
  5391.               trailing zeros from the result.  When evaluating expressions,
  5392.               *, /, and %% take precedence over + and -.  For example, 3 + 4
  5393.               * 2 will be interpreted as 3 + 8  = 11, not as (3 + 4) * 2 =
  5394.               14.  To change this order of evaluation, use parentheses to
  5395.               specify the order you want.
  5396.  
  5397.               @EXEC[command]:  Execute the command.  The command can be a
  5398.               4DOS alias, internal command, external command, .BTM file, or
  5399.  
  5400.  
  5401.           ___________________________________________________________________
  5402.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  87
  5403.  
  5404.                                                        CHAPTER 5 / USING 4DOS
  5405.           ___________________________________________________________________
  5406.  
  5407.  
  5408.               .BAT file.  This function is a "back-door" entry into 4DOS
  5409.               command processing and should be used with extreme caution.
  5410.               Incorrect or recursive use of @EXEC may cause stack overflows
  5411.               or hang your system.  @EXEC is primarily intended for running
  5412.               a program from within the PROMPT, where it should also be used
  5413.               with caution.
  5414.  
  5415.               @EXT[filename]:  Returns the extension from a file name,
  5416.               without a leading period.
  5417.  
  5418.               @EXTENDED[b|k|m]:  Returns the amount of extended memory.
  5419.  
  5420.               @FILEDATE[filename]:  Returns the date a file was last
  5421.               modified, in the default country format (mm-dd-yy for the US).
  5422.  
  5423.               @FILESIZE[filename,b|k|m]:  Returns the size of a file, or -1
  5424.               if the file does not exist.
  5425.  
  5426.               @FILETIME[filename]:  Returns the time a file was last
  5427.               modified, in hh:mm format.  The separator character will vary
  5428.               with the country definition in use on your system.
  5429.  
  5430.               @FULL[filename]:  Returns the fully qualified path name of a
  5431.               file.
  5432.  
  5433.               @INDEX[string1,string2]:  Returns the position of string2
  5434.               within string1, or "-1" if string2 is not found.  The first
  5435.               position in string1 is numbered 0.
  5436.  
  5437.               @INT[n]:  Returns the integer part of the number n.
  5438.  
  5439.               @LABEL[d:]:  Returns the volume label of the specified disk
  5440.               drive.
  5441.  
  5442.               @LEN[string]:  Returns the length of a string.
  5443.  
  5444.               @LINE[filename,n]:  Returns line "n" from the specified file.
  5445.               The first line in the file is numbered 0.  "**EOF**" is
  5446.               returned for all line numbers beyond the end of the file.
  5447.               @LINE will retrieve input from STDIN if you specify "con" as
  5448.               the filename.  If you are redirecting input to @LINE using
  5449.               this feature, you must use command grouping (see page 92)
  5450.               since redirection is normally performed AFTER variable
  5451.               functions are processed.  For example:
  5452.  
  5453.                    (echo %@line[con,0]) < myfile.dat
  5454.  
  5455.  
  5456.  
  5457.  
  5458.           ___________________________________________________________________
  5459.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  88
  5460.  
  5461.                                                        CHAPTER 5 / USING 4DOS
  5462.           ___________________________________________________________________
  5463.  
  5464.  
  5465.  
  5466.               @LINES[filename]:  Returns the line number of the last line in
  5467.               the file, or -1 if the file is empty.  The first line in the
  5468.               file is numbered 0, so (for example) @LINES will return 0 for
  5469.               a file containing one line.
  5470.  
  5471.               @LOWER[string]:  Returns the string converted to lower case.
  5472.  
  5473.               @LPT[n]:  Returns a "1" if the specified printer is ready;
  5474.               otherwise, returns "0".  n=1 checks the printer connected to
  5475.               LPT1, n=2 checks LPT2, and n=3 checks LPT3.
  5476.  
  5477.               @MAKEDATE[n]:  Returns a date (formatted according to the
  5478.               current country settings) from a number of days since 1/1/80.
  5479.               This is the opposite of @DATE.
  5480.  
  5481.               @MAKETIME[n]:  Returns a time (formatted according to the
  5482.               current country settings) from a number of seconds since
  5483.               midnight.  This is the opposite of @TIME.
  5484.  
  5485.               @NAME[filename]:  Returns the base name of a file, without the
  5486.               path or extension.
  5487.  
  5488.               @PATH[filename]:  Returns the path from a file name, including
  5489.               the drive letter and a trailing backslash but not including
  5490.               the base name or extension.
  5491.  
  5492.               @READSCR[row,col,length]:  Returns the text displayed on the
  5493.               screen at the specified location.  The first row and column on
  5494.               the screen are numbered 0.
  5495.  
  5496.               @READY[d:]:  Returns "1" if the specified drive is ready;
  5497.               otherwise returns "0".
  5498.  
  5499.               @REMOTE[d:]:  Returns "1" if the specified drive is a remote
  5500.               (network) drive; otherwise returns "0".
  5501.  
  5502.               @REMOVABLE[d:]:  Returns "1" if the specified drive is
  5503.               removable (i.e., a floppy disk or removable hard disk);
  5504.               otherwise returns "0".
  5505.  
  5506.               @SEARCH[filename]:  Searches for the filename using the PATH
  5507.               environment variable, appending an extension (.COM, .EXE,
  5508.               .BAT, .BTM, or executable extension) if one isn't specified.
  5509.               Returns the fully-expanded name of the file including drive,
  5510.               path, base name, and extension, or an empty string if a
  5511.               matching file is not found.  If wildcards are used in the
  5512.               filename, @SEARCH will search for the first file that matches
  5513.  
  5514.  
  5515.           ___________________________________________________________________
  5516.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  89
  5517.  
  5518.                                                        CHAPTER 5 / USING 4DOS
  5519.           ___________________________________________________________________
  5520.  
  5521.  
  5522.               the wildcard specification, and return the drive and path for
  5523.               that file plus the wildcard filename (e.g., E:\UTIL\*.COM).
  5524.  
  5525.               @SELECT[filename,top,left,bottom,right,title]:  Pops up a
  5526.               selection window with the lines from the specified file.
  5527.               Returns the text of the line the scrollbar is on if you press
  5528.               RETURN, or an empty string if you press ESCAPE.  @SELECT can
  5529.               be used to design menus or other selection lists from inside a
  5530.               batch file.  To select from lines passed through a pipe, use
  5531.               CON as the filename.
  5532.  
  5533.               @SUBSTR[string,start,length]:  Returns a substring, starting
  5534.               at the position "start" and continuing for "length"
  5535.               characters.  If the length is omitted, it will default to the
  5536.               remainder of the string.  If the length is negative, the start
  5537.               is relative to the right side of the string.  The first
  5538.               character in the string is numbered 0; if the length is
  5539.               negative, the last character is numbered 0.  For example,
  5540.               %@SUBSTR[%_time,0,2] gets the current time and extracts the
  5541.               hour.  If the string includes commas, it must be quoted with
  5542.               double quotes ["] or back-quotes [`].  The quotes do count in
  5543.               calculating the position of the substring to be extracted.
  5544.  
  5545.               @TIME[hh:mm:ss]:  Returns the number of seconds since midnight
  5546.               for the specified time.  The time must be in 24-hour format;
  5547.               "am" and "pm" cannot be used.
  5548.  
  5549.               @TRUENAME[filename]:  Returns the true, fully-expanded name
  5550.               for a file.  TRUENAME will see "through" a JOIN or SUBST, and
  5551.               requires DOS 3.0 or above.  Wildcards may not be used in the
  5552.               filename.
  5553.  
  5554.               @UNIQUE[d:\path]:  Creates a zero-length file with a unique
  5555.               name in the specified directory, and returns the full name and
  5556.               path.  If no path is specified, the file will be created in
  5557.               the current directory.  This function allows you to create a
  5558.               temporary file without overwriting an existing file.  @UNIQUE
  5559.               only works in DOS 3.0 and above.
  5560.  
  5561.               @UPPER[string]:  Returns the string converted to upper case.
  5562.  
  5563.               @WORD[n,string]:  Returns the "nth" word in a string.  The
  5564.               first word is numbered 0.  If "n" is negative, words are
  5565.               returned from the end of the string.  Only spaces, tabs, and
  5566.               commas are considered to be word separators.  For example:
  5567.  
  5568.                    %@WORD[2,NOW IS THE TIME]      returns "THE"
  5569.                    %@WORD[-0,NOW IS THE TIME]     returns "TIME"
  5570.  
  5571.  
  5572.           ___________________________________________________________________
  5573.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  90
  5574.  
  5575.                                                        CHAPTER 5 / USING 4DOS
  5576.           ___________________________________________________________________
  5577.  
  5578.  
  5579.                    %@WORD[-2,NOW IS THE TIME]     returns "IS"
  5580.  
  5581.               @XMS[b|k|m]:  Returns the amount of free XMS memory.
  5582.  
  5583.               You can use these variable functions in a wide variety of ways
  5584.               depending on your needs.  We've included a few examples below
  5585.               to give you an idea of what's possible.
  5586.  
  5587.               To set the prompt to show the amount of free base memory (see
  5588.               the PROMPT command, page 278,  for details on including
  5589.               variable functions in your prompt):
  5590.  
  5591.                    c:\> prompt (%%@dosmem[K]K) $p$g
  5592.  
  5593.               Set up a simple command line calculator.  The calculator is
  5594.               used with a command like CALC 3 * (4 + 5):
  5595.  
  5596.                    c:\> alias calc `echo The answer is:  %@eval[%&]`
  5597.  
  5598.               The following batch file uses variable functions to implement
  5599.               "once a day" execution of a group of commands.  It works by
  5600.               constructing a 6-digit number "yymmdd" from today's date, and
  5601.               comparing that to a number of the same type stored in the file
  5602.               C:\ONCEADAY.DAT.  If today's date is numerically larger than
  5603.               the saved date, and the time is after 6:00 AM, then the "once
  5604.               a day" commands are run, and today's date is saved in the file
  5605.               as the new date for comparison.  Otherwise, no action is
  5606.               taken.  You can make this file simpler using the %@DATE and
  5607.               %@TIME functions instead of using %@SUBSTR to extract
  5608.               substrings of the %_DATE and %_TIME variables; we used the
  5609.               approach shown to demonstrate the use of %@SUBSTR.
  5610.  
  5611.                   rem  Temporary variables used to shorten example lines:
  5612.                   rem    DD is _date, DY is yymmdd date, TM is _time
  5613.                   set dd=%_date
  5614.                   set dy=%@substr[%dd,6,2]%@substr[%dd,0,2]%@substr[%dd,3,2]
  5615.                   set lastdate=0
  5616.                   iff exist c:\onceaday.dat then
  5617.                     set lastdate=%@line[onceaday.dat,0]
  5618.                   endiff
  5619.                   iff %dy gt %lastdate then
  5620.                     set tm=%_time
  5621.                     iff "%@substr[%tm,0,2]%@substr[%tm,3,2]" gt "0600" then
  5622.                       rem Commands to be executed once a day go here
  5623.                       echo %dy > c:\onceaday.dat
  5624.                     endiff
  5625.                   endiff
  5626.  
  5627.  
  5628.  
  5629.           ___________________________________________________________________
  5630.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  91
  5631.  
  5632.                                                        CHAPTER 5 / USING 4DOS
  5633.           ___________________________________________________________________
  5634.  
  5635.  
  5636.  
  5637.  
  5638.           ## Advanced Features
  5639.  
  5640.               The next four 4DOS features are designed for advanced users of
  5641.               DOS and 4DOS.  If you are a novice user, you might want to
  5642.               skim over this section and return to it as your computing
  5643.               skills and needs progress.
  5644.  
  5645.  
  5646.               Conditional Commands
  5647.  
  5648.               When an internal command or external program finishes, it
  5649.               returns a result called the exit code.  4DOS's conditional
  5650.               commands allow you to perform tasks based upon the previous
  5651.               command's exit code.  Most programs return a 0 if they are
  5652.               successful and a non-zero value if they encounter an error.
  5653.  
  5654.               If you separate two commands by && (AND), the second command
  5655.               will be executed only if the first returns an exit code of 0.
  5656.               For example, the following command will only erase files if
  5657.               the BACKUP operation succeeds:
  5658.  
  5659.                    c:\> backup c:\ a: && del c:\*.bak;*.lst
  5660.  
  5661.               If you separate two commands by || (OR), the second command
  5662.               will be executed only if the first returns a non-zero exit
  5663.               code.  For example, if the following BACKUP operation fails,
  5664.               then ECHO will display a message:
  5665.  
  5666.                    c:\> backup c:\ a: || echo Error in the backup!
  5667.  
  5668.               All 4DOS internal commands return an explicit exit code, but
  5669.               not all application programs do.  Conditional commands will
  5670.               behave unpredictably if you use them with programs which do
  5671.               not return an explicit exit code.
  5672.  
  5673.  
  5674.               Command Grouping
  5675.  
  5676.               Command grouping allows you to logically group a set of
  5677.               commands together by enclosing them in parentheses.  The
  5678.               parentheses are similar in function to the BEGIN and END block
  5679.               statements in some programming languages.  Command grouping is
  5680.               a feature of the OS/2 command processor which 4DOS makes
  5681.               available to you under DOS as well.
  5682.  
  5683.  
  5684.  
  5685.  
  5686.           ___________________________________________________________________
  5687.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  92
  5688.  
  5689.                                                        CHAPTER 5 / USING 4DOS
  5690.           ___________________________________________________________________
  5691.  
  5692.  
  5693.  
  5694.               There are two primary uses for command grouping.  One is to
  5695.               execute multiple commands in a place where normally only a
  5696.               single command is allowed.  For example, suppose you want to
  5697.               copy then rename all the .WKQ files on drives A: and B: using
  5698.               the FOR command.  You could do it like this:
  5699.  
  5700.                    c:\> for %drv in (A B) do copy %drv:*.wkq d:\wksave\
  5701.                    c:\> for %drv in (A B) do ren %drv:*.wkq *.old
  5702.  
  5703.               But with command grouping you can do the same thing in one
  5704.               command (enter this on one line):
  5705.  
  5706.                    c:\> for %drv in (A B) do (copy %drv:*.wkq d:\wksave\ ^
  5707.                         ren %drv:*.wkq *.sav)
  5708.  
  5709.               The COPY and REN commands enclosed in the parentheses appear
  5710.               to FOR as if they were a single command, so both commands are
  5711.               executed for every element of the FOR list.
  5712.  
  5713.               This kind of command grouping is most useful with the EXCEPT,
  5714.               FOR, GLOBAL, and IF commands.  You can not use command
  5715.               grouping to make SELECT execute several commands, because
  5716.               SELECT will assume that the parentheses are marking the list
  5717.               of files from which to select, and will display an error
  5718.               message or give incorrect results if you try to use
  5719.               parentheses for command grouping instead.  (You can use a
  5720.               SELECT command inside the command grouping parentheses, you
  5721.               just can't use command grouping to specify a group of commands
  5722.               for SELECT to execute.)
  5723.  
  5724.               The second common use of command grouping is to redirect input
  5725.               or output for several commands without repeatedly using the
  5726.               redirection symbols.  For example, consider the following
  5727.               batch file fragment which places some header lines (including
  5728.               today's date) and directory displays in an output file using
  5729.               redirection.  The first ECHO command creates the file using >,
  5730.               and the other commands append to the file using >>:
  5731.  
  5732.                    echo Data files %_date > filelist
  5733.                    dir *.dat >> filelist
  5734.                    echo. >> filelist
  5735.                    echo Text files %_date >> filelist
  5736.                    dir *.txt >> filelist
  5737.  
  5738.               Using command grouping, these commands can be written much
  5739.               more simply (enter this on one line):
  5740.  
  5741.  
  5742.  
  5743.           ___________________________________________________________________
  5744.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  93
  5745.  
  5746.                                                        CHAPTER 5 / USING 4DOS
  5747.           ___________________________________________________________________
  5748.  
  5749.  
  5750.  
  5751.                    (echo Data files %_date ^ dir *.dat ^ echo. ^ echo Text
  5752.                    files %_date ^ dir *.txt) > filelist
  5753.  
  5754.               The redirection, which appears outside the parentheses,
  5755.               applies to all the commands within the parentheses.  The same
  5756.               approach can be used for input redirection and for piping.
  5757.  
  5758.               You can also use command grouping in a batch file or at the
  5759.               prompt to split commands over several lines.  This last
  5760.               example is like the redirection example above, but is entered
  5761.               at the prompt.  Note that 4DOS displays a "More? prompt after
  5762.               each incomplete line.  None of the commands are executed until
  5763.               the command group is completed with the closing parenthesis.
  5764.               This example does not have to be entered on one line:
  5765.  
  5766.                    c:\> (echo Data files %_date
  5767.                    More? dir *.dat
  5768.                    More? echo.
  5769.                    More? echo Text files %_date
  5770.                    More? dir *.txt) > filelist
  5771.                    c:\>
  5772.  
  5773.               A group of commands in parentheses is like a long command
  5774.               line.  The total length of the group may not exceed 511
  5775.               characters, whether the commands are entered from the prompt,
  5776.               an alias, or a batch file.  The 511-character limit includes
  5777.               the space required to expand aliases and environment variables
  5778.               invoked within the group.
  5779.  
  5780.  
  5781.               Escape Character
  5782.  
  5783.               4DOS recognizes a user-definable escape character.  This
  5784.               character gives the following character a special meaning;  it
  5785.               is not the same as the ASCII ESC that is often used in ANSI
  5786.               sequences.  The default 4DOS escape character is Ctrl-X (ASCII
  5787.               24), which will be displayed on your screen as an up arrow.
  5788.               (The escape character is shown below as "^X", but when
  5789.               entering it you must use the single keystroke Ctrl-X or ASCII
  5790.               24, not "^" followed by "X"!).  You can use the SETDOS /E
  5791.               command or the EscapeChar directive in 4DOS.INI to select a
  5792.               different escape character if you wish.
  5793.  
  5794.               4DOS recognizes six special characters if they are preceded by
  5795.               the escape character.  The combination of the escape character
  5796.               and one of these characters is translated to a single
  5797.               character by 4DOS, as shown below.  These are useful for
  5798.  
  5799.  
  5800.           ___________________________________________________________________
  5801.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  94
  5802.  
  5803.                                                        CHAPTER 5 / USING 4DOS
  5804.           ___________________________________________________________________
  5805.  
  5806.  
  5807.               redirecting codes to the printer; ^Xe is also useful to
  5808.               generate ANSI "escape sequences" in your PROMPT, ECHO, or
  5809.               other output commands; and ^Xr is used in keystroke aliases:
  5810.  
  5811.                    ^Xb   backspace
  5812.                    ^Xe   the ASCII ESC character (ASCII 27)
  5813.                    ^Xf   form feed
  5814.                    ^Xn   line feed
  5815.                    ^Xr   carriage return
  5816.                    ^Xt   tab character
  5817.  
  5818.               If you follow the escape character with any other character,
  5819.               the escape character is removed and the second character is
  5820.               copied directly to the command line.  This allows you to
  5821.               suppress the normal meaning of special characters (such as ? *
  5822.               / \ | " ` > < and &).
  5823.  
  5824.               For example, to send a form feed followed by the sequence ESC
  5825.               Y to the printer, you can use this command:
  5826.  
  5827.                    c:\> echos ^Xf^XeY > prn
  5828.  
  5829.  
  5830.               Argument Quoting
  5831.  
  5832.               When it begins to parse the command line, 4DOS looks for
  5833.               carets [^] to break the line into individual commands, for
  5834.               redirection symbols, and for white space (blanks, tabs, and
  5835.               commas) to separate commands from arguments.  It also looks
  5836.               for percent signs [%] which designate alias or batch file
  5837.               replaceable parameters (%1, %2, etc.), or environment
  5838.               variables, and substitutes the appropriate value for each
  5839.               variable (this process is called variable expansion).
  5840.               Normally, the separation characters and the percent sign
  5841.               cannot be passed to a command as part of an argument.
  5842.               However, you can include any of these special characters in an
  5843.               argument by enclosing the entire argument in back quotes [`]
  5844.               or double quotes ["].  Although both back quotes and double
  5845.               quotes will let you build arguments that include special
  5846.               characters, they do not work the same way.
  5847.  
  5848.               No alias or variable expansion will be performed on an
  5849.               argument enclosed in back quotes.  Redirection symbols inside
  5850.               the back quotes will be ignored.  The back quotes will be
  5851.               removed from the command line before the command is executed.
  5852.  
  5853.               No alias expansion will be performed on expressions enclosed
  5854.               in double quotes.  Redirection symbols inside double quotes
  5855.  
  5856.  
  5857.           ___________________________________________________________________
  5858.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  95
  5859.  
  5860.                                                        CHAPTER 5 / USING 4DOS
  5861.           ___________________________________________________________________
  5862.  
  5863.  
  5864.               will be ignored.  However, variable expansion will be
  5865.               performed on expressions inside double quotes.  The double
  5866.               quotes themselves will be passed through to the command as
  5867.               part of the argument.
  5868.  
  5869.               For example, suppose the batch file QUOTES.BAT contains the
  5870.               following commands:
  5871.  
  5872.                    @echo off
  5873.                    echo Arg1 = %1
  5874.                    echo Arg2 = %2
  5875.                    echo Arg3 = %3
  5876.  
  5877.               and that the environment variable FORVAR has been defined with
  5878.               this command:
  5879.  
  5880.                    c:\> set FORVAR=for
  5881.  
  5882.               Now, if you enter the command
  5883.  
  5884.                    c:\> quotes `Now is the time %forvar` all good
  5885.  
  5886.               the output from QUOTES.BAT will look like this:
  5887.  
  5888.                    Arg1 = Now is the time %forvar
  5889.                    Arg2 = all
  5890.                    Arg3 = good
  5891.  
  5892.               But if you enter the command
  5893.  
  5894.                    c:\> quotes "Now is the time %forvar" all good
  5895.  
  5896.               the output from QUOTES.BAT will look like this:
  5897.  
  5898.                    Arg1 = "Now is the time for"
  5899.                    Arg2 = all
  5900.                    Arg3 = good
  5901.  
  5902.               Notice that in both cases, the quotes keep characters together
  5903.               and reduce the number of arguments in the line.
  5904.  
  5905.               The following example has 7 command line arguments, while the
  5906.               examples above only have 3:
  5907.  
  5908.                    c:\> quotes Now is the time %forvar all good
  5909.  
  5910.               When an alias is defined in a batch file or from the command
  5911.               line, its argument should be enclosed in back quotes to
  5912.  
  5913.  
  5914.           ___________________________________________________________________
  5915.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  96
  5916.  
  5917.                                                        CHAPTER 5 / USING 4DOS
  5918.           ___________________________________________________________________
  5919.  
  5920.  
  5921.               prevent the expansion of replaceable parameters, variables,
  5922.               and multiple commands until the alias is invoked.  Back quotes
  5923.               should not be used when defining aliases to be read in an
  5924.               ALIAS /R file.
  5925.  
  5926.  
  5927.           Aliases
  5928.  
  5929.               Much of the power of 4DOS comes together in aliases, which
  5930.               give you the ability to create your own commands.  An alias is
  5931.               a name that you select for a command or group of commands.
  5932.               Simple aliases substitute a new name for an existing command.
  5933.               More complex aliases can redefine the default settings of 4DOS
  5934.               commands, operate as very fast in-memory batch files, and
  5935.               perform actions based on the results of other actions.
  5936.  
  5937.               This section of the manual will show you some examples of the
  5938.               power of aliases.  You can use these examples as the basis for
  5939.               your own aliases.  See the ALIAS command (page 174) for
  5940.               complete details about writing your own aliases.
  5941.  
  5942.               The simplest type of alias gives a new name to an existing
  5943.               command.  For example, you could create a command called ROOT
  5944.               to switch to the root directory this way:
  5945.  
  5946.                    c:\> alias root = `cd \`
  5947.  
  5948.               After the alias has been defined this way, every time you type
  5949.               the command ROOT, 4DOS will execute the command CD \.
  5950.  
  5951.               Aliases can also create customized versions of 4DOS commands.
  5952.               For example, the 4DOS DIR command can sort a directory in
  5953.               various ways.  You can create an alias called DE that means
  5954.               "sort the directory by filename extension, and pause after
  5955.               each page while displaying it" like this:
  5956.  
  5957.                    c:\> alias de = `dir /oe /p`
  5958.  
  5959.               Aliases can be used to execute sequences of commands as well.
  5960.               The following command creates an alias called W which saves
  5961.               the current drive and directory, changes to the WP directory
  5962.               on drive C, runs the program E:\WP51\WP.EXE, and, when the
  5963.               program terminates, returns to the original drive and
  5964.               directory:
  5965.  
  5966.                    c:\> alias w = `pushd c:\wp ^ e:\wp51\wp.exe ^ popd`
  5967.  
  5968.  
  5969.  
  5970.  
  5971.           ___________________________________________________________________
  5972.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  97
  5973.  
  5974.                                                        CHAPTER 5 / USING 4DOS
  5975.           ___________________________________________________________________
  5976.  
  5977.  
  5978.  
  5979.               Aliases can be nested, that is, one alias can invoke another.
  5980.               For example, the alias above could also be written as:
  5981.  
  5982.                    c:\> alias wp = `e:\wp51\wp.exe`
  5983.                    c:\> alias w = `pushd c:\wp ^ wp ^ popd`
  5984.  
  5985.               If you enter the W command, 4DOS will execute the PUSHD
  5986.               command, detect that the next command (WP) is another alias,
  5987.               execute the program E:\WP51\WP.EXE, and -- when the program
  5988.               exits -- return to the first alias, execute the POPD command,
  5989.               and finally return to the prompt.
  5990.  
  5991.               You can use aliases to change the default options for both
  5992.               internal 4DOS commands and external commands.  Suppose that
  5993.               you always want the DEL command to prompt before it erases a
  5994.               file:
  5995.  
  5996.                    c:\> alias del = `*del /p`
  5997.  
  5998.               You may have a program on your system that has the same name
  5999.               as an internal 4DOS command.  Normally, 4DOS will run the
  6000.               internal command and not let you run the program you desire,
  6001.               unless you explicitly add its full path on the command line
  6002.               (type C:\UTIL\LIST.COM, for example).  Aliases give you two
  6003.               ways to get around this problem.
  6004.  
  6005.               First, you could define an alias that runs the program in
  6006.               question, but with a different name.  For example, if you want
  6007.               to run a program called HELP.EXE when you type HLP, this alias
  6008.               will do the trick:
  6009.  
  6010.                    c:\> alias hlp = `c:\dos\help.exe`
  6011.  
  6012.               Another approach you could take would be to rename the
  6013.               internal 4DOS command and use the original name for the
  6014.               external program.  The following example renames the 4DOS LIST
  6015.               command as DISPLAY and then uses a second alias to run
  6016.               LIST.COM whenever you type LIST:
  6017.  
  6018.                    c:\> alias display = `*list`
  6019.                    c:\> alias list = `c:\util\list.com`
  6020.  
  6021.               You can also assign an alias to a key, so that every time you
  6022.               press the key, the command will be invoked.  After you enter
  6023.               this next example, 4DOS will display a 2-column directory with
  6024.               paging whenever you press Shift plus F5:
  6025.  
  6026.  
  6027.  
  6028.           ___________________________________________________________________
  6029.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  98
  6030.  
  6031.                                                        CHAPTER 5 / USING 4DOS
  6032.           ___________________________________________________________________
  6033.  
  6034.  
  6035.  
  6036.                    c:\> alias @Shift-F5 = `*dir /2/p`
  6037.  
  6038.               That example will put the DIR command on the command line when
  6039.               you press F5 and wait for you to enter file names to display
  6040.               and then press Enter.  This next example clears the screen
  6041.               whenever you press Alt-F1.  The "^X" is the 4DOS escape
  6042.               character (see page 94), which you enter by pressing Ctrl-X
  6043.               (it is entered twice before the r at the end of this alias):
  6044.  
  6045.                    c:\> alias @Alt-F1 = `cls^X^Xr`
  6046.  
  6047.               Aliases have many other capabilities as well.  This example
  6048.               creates a simple command-line calculator.  Once you have
  6049.               entered the example, you can type CALC 4*19, for example, and
  6050.               4DOS will display the answer:
  6051.  
  6052.                    c:\> alias calc = `echo The answer is:  %@eval[%&]`
  6053.  
  6054.               Our last example in this section creates an alias called IN.
  6055.               It will temporarily change directories, run an internal or
  6056.               external command, and then return to the current directory
  6057.               when the command is finished:
  6058.  
  6059.                    c:\> alias in = `pushd %1 ^ %2& ^ popd`
  6060.  
  6061.               Now if you type
  6062.  
  6063.                    c:\> in c:\letters wp letter.txt
  6064.  
  6065.               4DOS will change to the C:\LETTERS subdirectory, execute the
  6066.               command WP LETTER.TXT and then return to the current
  6067.               directory.
  6068.  
  6069.               The distribution diskette includes a sample alias file called
  6070.               ALIASES which contains several useful aliases and demonstrates
  6071.               many alias techniques.  Also, see the ALIAS and UNALIAS
  6072.               commands on pages 174 and 315 for more information and
  6073.               examples.  See page 104 for tips about using aliases inside
  6074.               your batch files.
  6075.  
  6076.  
  6077.           Batch Files
  6078.  
  6079.               A batch file is a file that contains a list of commands for
  6080.               4DOS to execute.  4DOS reads and interprets each line as if it
  6081.               had been typed at the keyboard.  Like aliases, batch files are
  6082.               handy for automating computing tasks.  Unlike aliases, batch
  6083.  
  6084.  
  6085.           ___________________________________________________________________
  6086.           Copyright 1992, JP Software Inc.       4DOS Reference Manual  /  99
  6087.  
  6088.                                                        CHAPTER 5 / USING 4DOS
  6089.           ___________________________________________________________________
  6090.  
  6091.  
  6092.               files can be as long as you wish.  Batch files take up
  6093.               separate disk space for each file, and can't usually execute
  6094.               quite as quickly as aliases, since they must be read from the
  6095.               disk.
  6096.  
  6097.  
  6098.               .BAT Files and .BTM Files
  6099.  
  6100.               4DOS can execute a batch file in two different modes.  In the
  6101.               first, traditional mode, 4DOS reads and executes the lines of
  6102.               the batch file individually.  In the second mode, 4DOS reads
  6103.               the entire batch file into memory at once.  The second mode
  6104.               can be 5 to 10 times faster, especially if most of the
  6105.               commands in the batch file are internal 4DOS commands.
  6106.               However, only the first mode can be used for self-modifying
  6107.               batch files (which are rare), for batch files which install
  6108.               memory-resident utilities, and for batch files larger than 64K
  6109.               bytes.
  6110.  
  6111.               4DOS decides which batch file mode to use by the file's
  6112.               extension.  It runs files with a .BAT extension in the slower,
  6113.               traditional mode.  Files that have a .BTM extension are run in
  6114.               the faster, more efficient mode.  You can change the execution
  6115.               mode inside of a batch file (of either type) with the LOADBTM
  6116.               command (see page 264).
  6117.  
  6118.  
  6119.               Echoing
  6120.  
  6121.               By default, 4DOS displays or "echoes" every batch file line as
  6122.               it is executed.  You can change this behavior, if you want, in
  6123.               several different ways:
  6124.  
  6125.                    Any batch file line that begins with an [@] symbol will
  6126.                    not be displayed.
  6127.  
  6128.                    The display can be turned off and on within a batch file
  6129.                    with the ECHO OFF and ECHO ON commands.
  6130.  
  6131.                    The default setting can be changed with the SETDOS /V
  6132.                    command (see page 301) or the BatchEcho directive in
  6133.                    4DOS.INI (see page 129).
  6134.  
  6135.               For example, the following line turns off echoing inside a
  6136.               batch file.  The [@] symbol keeps the batch file from
  6137.               displaying the ECHO OFF command:
  6138.  
  6139.                    @echo off
  6140.  
  6141.  
  6142.           ___________________________________________________________________
  6143.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  100
  6144.  
  6145.                                                        CHAPTER 5 / USING 4DOS
  6146.           ___________________________________________________________________
  6147.  
  6148.  
  6149.  
  6150.               4DOS also has a command line echo that is unrelated to the
  6151.               batch file echo setting.  See the ECHO command on page 222 for
  6152.               details about both settings.
  6153.  
  6154.  
  6155.               Batch File Variables
  6156.  
  6157.               Like aliases and application programs, batch files can examine
  6158.               the command line that is used to invoke them.  4DOS separates
  6159.               the command tail (everything on the command line after the
  6160.               batch file name) into individual parameters or variables by
  6161.               scanning for the spaces, tabs, and commas that separate the
  6162.               parameters.  A batch file can work with individual parameters
  6163.               or with the command tail as a whole.
  6164.  
  6165.               4DOS numbers these replaceable parameters from %1 to %127.  It
  6166.               is up to the batch file to determine the meaning of each
  6167.               parameter.  Parameters that are referred to in a batch file,
  6168.               but which are missing on the command line, appear as empty
  6169.               strings inside the batch file.
  6170.  
  6171.               A batch file can also work with three special parameters: %0
  6172.               contains the name of the batch file as it was entered on the
  6173.               command line, %# contains the number of command-line
  6174.               arguments, and %n& contains the complete command line tail
  6175.               starting with argument number "n".  The default value of "n"
  6176.               is 1, so %& contains the entire command tail.  The values of
  6177.               these special parameters can change if you use the SHIFT
  6178.               command (see page 306).
  6179.  
  6180.               For example, suppose the batch file interprets the first
  6181.               argument as a subdirectory name.  Then the following line
  6182.               would move to the specified directory:
  6183.  
  6184.                    cd %1
  6185.  
  6186.               A friendlier batch file would check to make sure the directory
  6187.               exists and take some special action if it doesn't:
  6188.  
  6189.                    iff isdir %1 then ^ cd %1
  6190.                    else ^ echo Subdirectory %1 does not exist ^ quit
  6191.                    endiff
  6192.  
  6193.               (see the IF and IFF commands on pages 245 and 251).
  6194.  
  6195.            ## Batch files can also use environment variables, internal
  6196.               variables, and variable functions.  See pages 81 - 91 for a
  6197.  
  6198.  
  6199.           ___________________________________________________________________
  6200.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  101
  6201.  
  6202.                                                        CHAPTER 5 / USING 4DOS
  6203.           ___________________________________________________________________
  6204.  
  6205.  
  6206.               complete list of the internal variables and variable functions
  6207.               available.  You can use these variables and functions to
  6208.               determine system status (e.g., the type of CPU in the system),
  6209.               resource levels (e.g., the amount of free disk space), file
  6210.               information (e.g., the date and time  a file was last
  6211.               modified) and other information (e.g., the current date and
  6212.               time).  You can also perform arithmetic (including date
  6213.               arithmetic), manipulate strings and substrings, extract parts
  6214.               of a filename, and perform simple file access.
  6215.  
  6216.            ## To create temporary variables for use inside a batch file,
  6217.               just use the SET command to store the information you want in
  6218.               an environment variable.  Pick a variable name that isn't
  6219.               likely to be in use by some other program (for example, PATH
  6220.               would be a bad choice), and use the UNSET command (page 316)
  6221.               to remove these variables from the environment at the end of
  6222.               your batch file.  You can also use SETLOCAL and ENDLOCAL
  6223.               (pages 305 and 225) to create a "local" environment so that
  6224.               the original environment will be restored when your batch file
  6225.               is finished.
  6226.  
  6227.            ## Environment variables used in a batch file may contain either
  6228.               numbers or text.  It is up to you to keep track of what's in
  6229.               each variable and use it appropriately; if you don't (for
  6230.               example, if you use %@EVAL to add a number to a text string),
  6231.               you'll get an error message.
  6232.  
  6233.            ## Be careful not to confuse the various kinds of variables that
  6234.               4DOS provides.  Replaceable parameters, environment variables,
  6235.               internal variables, and variable functions look similar and
  6236.               have similar uses but they are not the same.
  6237.  
  6238.  
  6239.               Batch File Commands
  6240.  
  6241.               Several 4DOS commands are particularly suited to batch file
  6242.               processing.  Each command is explained in detail in the
  6243.               Command Reference section of this manual, beginning on page
  6244.               167.  Here is a list of some of the commands you might find
  6245.               most useful:
  6246.  
  6247.                    BEEP produces a sound of any pitch and duration through
  6248.                    the computer's speaker.
  6249.  
  6250.                    CALL executes one batch file from within another.
  6251.  
  6252.                    CANCEL terminates all batch file processing.
  6253.  
  6254.  
  6255.  
  6256.           ___________________________________________________________________
  6257.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  102
  6258.  
  6259.                                                        CHAPTER 5 / USING 4DOS
  6260.           ___________________________________________________________________
  6261.  
  6262.  
  6263.  
  6264.                    CLS and COLOR set the screen display colors.
  6265.  
  6266.                    DRAWBOX draws a box on the screen.
  6267.  
  6268.                    DRAWHLINE and DRAWVLINE draw horizontal and vertical
  6269.                    lines on the screen.
  6270.  
  6271.                    ECHO and ECHOS print text on the screen (the text can be
  6272.                    redirected to a file or device).
  6273.  
  6274.                    GOSUB executes a subroutine inside a batch file.  The
  6275.                    RETURN command terminates the subroutine.
  6276.  
  6277.                    GOTO branches to a different location in the batch file.
  6278.  
  6279.                    FOR executes commands for each file that matches a set of
  6280.                    wildcards, or each entry in a list.
  6281.  
  6282.                    IF and IFF execute commands based on a test of string or
  6283.                    numeric values, program exit codes, or other conditions.
  6284.  
  6285.                    INKEY and INPUT collect keyboard input from the user and
  6286.                    store it in environment variables.
  6287.  
  6288.                    KEYSTACK places keystrokes into the 4DOS Keystack.
  6289.  
  6290.                    LOADBTM changes the batch file operating mode.
  6291.  
  6292.                    PAUSE displays a message and waits for the user to press
  6293.                    a key.
  6294.  
  6295.                    QUIT ends the current batch file and optionally returns
  6296.                    an exit code.
  6297.  
  6298.                    REM places a remark in a batch file.
  6299.  
  6300.                    SCREEN positions the cursor on the screen and optionally
  6301.                    prints a message at the new location.
  6302.  
  6303.                    SCRPUT displays a message in color.
  6304.  
  6305.                    SETLOCAL saves the current disk drive, default directory,
  6306.                    environment, and alias list.  ENDLOCAL restores the
  6307.                    settings that were saved.
  6308.  
  6309.                    SHIFT changes the numbering of the replaceable
  6310.                    parameters.
  6311.  
  6312.  
  6313.           ___________________________________________________________________
  6314.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  103
  6315.  
  6316.                                                        CHAPTER 5 / USING 4DOS
  6317.           ___________________________________________________________________
  6318.  
  6319.  
  6320.  
  6321.                    TEXT displays a block of text.  ENDTEXT ends the block.
  6322.  
  6323.                    TIMER starts or reads a stopwatch.
  6324.  
  6325.                    VSCRPUT displays a vertical message in color.
  6326.  
  6327.               These commands, along with the 4DOS internal variables and
  6328.               variable functions, make the 4DOS batch file language
  6329.               extremely powerful.  The distribution diskette contains a
  6330.               number of sample batch files that demonstrate some of the
  6331.               things you can do with 4DOS batch files.
  6332.  
  6333.  
  6334.               ## Batch File Tips
  6335.  
  6336.               This section gives you some tips on batch file programming,
  6337.               including a few things we've found useful and a few that you
  6338.               should stay away from.
  6339.  
  6340.               One way to simplify batch file programming is to use aliases.
  6341.               Not aliases that can be used from the command line, but
  6342.               aliases that hide unnecessary detail inside a batch file.  For
  6343.               example, suppose you want to implement a multiple choice list
  6344.               in a batch file that will let you select among several
  6345.               different applications.  This example shows one way to do so:
  6346.  
  6347.                    alias in `pushd %1 ^ %2& ^ popd`
  6348.                    alias choice `elseiff "%userchoice"=="%1" then`
  6349.                    :dispmenu
  6350.                    screen 8 0
  6351.                    text
  6352.                     Enter your choice:
  6353.                          1. Word Processing
  6354.                          2. Spreadsheet
  6355.                          3. Communications
  6356.                    endtext
  6357.                    inkey %%userchoice
  6358.                    iff "1"=="2" then ^ rem  Always fail and go to next line
  6359.                    choice 1 ^ in d:\letters  c:\wp51\wp.exe
  6360.                    choice 2 ^ in d:\finance  c:\quattro\q.exe
  6361.                    choice 3 ^ in d:\comm  c:\comsw\pcplus.exe
  6362.                    else
  6363.                      scrput 23 0 bri whi on red Invalid choice, try again
  6364.                      goto dispmenu
  6365.                    endiff
  6366.  
  6367.  
  6368.  
  6369.  
  6370.           ___________________________________________________________________
  6371.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  104
  6372.  
  6373.                                                        CHAPTER 5 / USING 4DOS
  6374.           ___________________________________________________________________
  6375.  
  6376.  
  6377.  
  6378.               The first alias, IN, expects 2 or more command-line arguments.
  6379.               It uses the first as a new working directory and changes to
  6380.               that directory with a PUSHD command.  The rest of the command
  6381.               line is interpreted as the name of an application program plus
  6382.               possible command line parameters, which the alias executes.
  6383.               This alias could be used from the command line.
  6384.  
  6385.               The second alias, CHOICE, expects 1 command line argument.  It
  6386.               tests whether an environment variable called userchoice has
  6387.               the same value as the command line argument.  But the test
  6388.               comes between ELSEIFF and THEN statements.  If you try to use
  6389.               CHOICE from the command line, 4DOS will generate an error
  6390.               because it will see ELSEIFF and THEN without the necessary IFF
  6391.               and ENDIFF to define a block.
  6392.  
  6393.               The next 9 lines print a menu on the screen and then get a
  6394.               keystroke from the user and store the keystroke in an
  6395.               environment variable called userchoice.  Then the batch file
  6396.               tests the user's keystroke to decide what action to take.
  6397.  
  6398.               Since the CHOICE alias starts with an ELSEIFF command, there
  6399.               has to be an IFF.  But the first condition must fail in order
  6400.               to get to the CHOICE aliases, so the IFF statement starts with
  6401.               a condition that will always be false.  The three lines after
  6402.               the IFF are easy to follow and much shorter than they would be
  6403.               without the aliases.  If it had to be typed in full, the first
  6404.               choice line would look like this:
  6405.  
  6406.                    elseiff "%userchoice"=="1" then pushd d:\letters ^
  6407.                    c:\wp\wp51.exe ^ popd
  6408.  
  6409.               There's another side to aliases in batch files.  If you're
  6410.               going to distribute your 4DOS batch files to others, you need
  6411.               to remember that they may have aliases defined for the
  6412.               commands you're going to use.  For example if the user has
  6413.               aliased CD to CDD and you aren't expecting this, your file may
  6414.               not work as you intended.  There are two ways to address this
  6415.               problem.  First, you can use SETLOCAL, ENDLOCAL, and UNALIAS
  6416.               to clear out aliases before your batch file starts and restore
  6417.               them at the end.  For example:
  6418.  
  6419.                    setlocal
  6420.                    unalias *
  6421.                    rem Aliases cleared, set up new aliases
  6422.                    alias ...
  6423.                    rem Other batch file commands go here
  6424.                    endlocal
  6425.  
  6426.  
  6427.           ___________________________________________________________________
  6428.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  105
  6429.  
  6430.                                                        CHAPTER 5 / USING 4DOS
  6431.           ___________________________________________________________________
  6432.  
  6433.  
  6434.  
  6435.               Remember that SETLOCAL and ENDLOCAL will save and restore not
  6436.               only the aliases but also the environment and the current
  6437.               drive and directory.
  6438.  
  6439.               If this method isn't appropriate or necessary for the batch
  6440.               file you're working on, you can also use an asterisk [*]
  6441.               before the name of any command.  The asterisk tells 4DOS not
  6442.               to interpret the command that follows it as an alias.  For
  6443.               example the following command redirects a list of file names
  6444.               to the file FILELIST:
  6445.  
  6446.                    dir /b > filelist
  6447.  
  6448.               However if the user has redefined DIR with an alias this
  6449.               command may not do what you want.  To get around this just
  6450.               use:
  6451.  
  6452.                    *dir /b > filelist
  6453.  
  6454.               The same can be done for any command in your batch file.  If
  6455.               you use the asterisk, 4DOS will skip alias processing, discard
  6456.               the asterisk, and process the rest of the command normally as
  6457.               an internal command, external command, or batch file.  Using
  6458.               an asterisk before a command will work whether or not there is
  6459.               actually an alias defined with the same name as the command.
  6460.               If there is no alias with that name, the asterisk will be
  6461.               ignored and the command will be processed as if the asterisk
  6462.               wasn't there.
  6463.  
  6464.               There are several tricks you can use in debugging batch files.
  6465.               Probably the simplest is to turn ECHO on at the beginning of
  6466.               the file while you're testing it, or use SETDOS /V2 to force
  6467.               echo on even if an ECHO OFF command is used in the batch file.
  6468.               This will give you a picture of what 4DOS is doing when it
  6469.               executes the file.  It will make your output look messy of
  6470.               course, so just turn it off once things are working.  You can
  6471.               also turn ECHO on at the beginning of a group of commands you
  6472.               want to "watch", and off at the end, just by adding ECHO
  6473.               commands at the appropriate spots in your file.
  6474.  
  6475.               Another trick is to insert PAUSE commands wherever you need
  6476.               them in order to be able to watch what's happening.  For
  6477.               complex debugging, you can make an alias that uses INKEY for a
  6478.               similar purpose, but helps you out a little more.  For example
  6479.               (enter this on one line):
  6480.  
  6481.  
  6482.  
  6483.  
  6484.           ___________________________________________________________________
  6485.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  106
  6486.  
  6487.                                                        CHAPTER 5 / USING 4DOS
  6488.           ___________________________________________________________________
  6489.  
  6490.  
  6491.  
  6492.                    alias step `set skey=^inkey Step:  %%skey^iff
  6493.                    "%skey"=="S" then ^ set /P ^ elseiff "%skey"=="X" then ^
  6494.                    quit ^ endiff`
  6495.  
  6496.               Now anywhere you insert a STEP command in your file you'll get
  6497.               the Step: prompt during execution.  At that point you can type
  6498.               S to do a SET /P and display the current contents of your
  6499.               environment variables, X to exit the batch file, and any other
  6500.               key to go on.  Of course you'll need to create an alias
  6501.               tailored to your particular needs, but this gives you the
  6502.               basic idea.
  6503.  
  6504.               If you can't figure out how 4DOS is expanding your aliases and
  6505.               variables, try turning LOG on at the start of the batch file.
  6506.               LOG keeps track of all commands after alias and variable
  6507.               expansion  are completed, and gives you a record in a file
  6508.               that you can examine after the batch file is done.
  6509.  
  6510.               You may also want to consider using redirection to capture
  6511.               your batch file output.  Simply type the batch file name
  6512.               followed by the redirection symbols, for example:
  6513.  
  6514.                    c:\> mybatch >& testout
  6515.  
  6516.               This records all batch file output, including error messages,
  6517.               in the file TESTOUT, so you can go back and examine it.  If
  6518.               you have ECHO ON in the batch file you'll get the batch
  6519.               commands intermingled with the output, which can provide a
  6520.               very useful trace of what's happening.  Of course output from
  6521.               full-screen commands and programs that don't write to the
  6522.               standard DOS output devices can't be recorded, but you can
  6523.               still gain a lot of useful information if your batch file does
  6524.               much output.
  6525.  
  6526.               If you're using redirection to see the output, remember that
  6527.               any prompts for input will probably go to the output file and
  6528.               not to the screen, so you need to know in advance the sequence
  6529.               of keystrokes required to get through the entire batch file,
  6530.               and enter them by hand or with KEYSTACK.  (As an example, the
  6531.               raw text for the 4DOS tour in this manual was created by
  6532.               writing a batch file containing the demonstration commands,
  6533.               testing it to get the proper keystroke sequence, and executing
  6534.               a command which used KEYSTACK to send the keystrokes and
  6535.               redirected the batch file's output to a disk file.)
  6536.  
  6537.               Because of the power of the 4DOS batch language, some
  6538.               programmers begin to treat it as a full, general-purpose
  6539.  
  6540.  
  6541.           ___________________________________________________________________
  6542.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  107
  6543.  
  6544.                                                        CHAPTER 5 / USING 4DOS
  6545.           ___________________________________________________________________
  6546.  
  6547.  
  6548.               language.  But the batch language is interpreted one line at a
  6549.               time, which can lead the unwary into some subtle traps.
  6550.  
  6551.               In particular, the IFF and GOTO instructions may not work
  6552.               together as many programmers expect.  4DOS has no way of
  6553.               telling whether a GOTO is branching within the same IFF block,
  6554.               into another IFF block, or out of all IFF blocks, so it has to
  6555.               make an assumption.  It assumes that the branch is leaving the
  6556.               IFF block and it therefore cancels all pending IFF processing.
  6557.               For example, the following commands will NOT work:
  6558.  
  6559.                    iff "%_monitor" == "color" then
  6560.                      iff %@diskfree[c:,K] gt 100 then
  6561.                        set var1=Y
  6562.                        goto point1
  6563.                      else
  6564.                        set var1=N
  6565.                      endiff
  6566.                    else
  6567.                      :point1
  6568.                      rem  do something else here
  6569.                    endiff
  6570.  
  6571.               If the GOTO in the 4th line is executed, the commands after
  6572.               :POINT1 will execute properly.  But 4DOS will generate an
  6573.               error message when it reaches the last ENDIFF, because it
  6574.               assumed that the GOTO branched outside of all IFF blocks.  You
  6575.               can override this restriction with GOTO /I, but do so only if
  6576.               you are absolutely certain that your GOTO command is branching
  6577.               entirely within the current active IFF statement, and not into
  6578.               another IFF statement or a different IFF nesting level.  Using
  6579.               /I under any other conditions will cause an error later in
  6580.               your batch file.
  6581.  
  6582.               Because the IFF state is saved whenever a GOSUB occurs or
  6583.               whenever another batch file is CALLed, GOTO only cancels IFF
  6584.               processing within the current subroutine or batch file.  This
  6585.               allows you to use GOTO inside a subroutine without affecting
  6586.               any IFF blocks that surround the GOSUB statement which called
  6587.               the subroutine.
  6588.  
  6589.               GOSUB and GOTO can also have unexpected consequences when
  6590.               mixed with chains to new batch files.  The GOSUB, and any
  6591.               block that contains it, remains active after the second batch
  6592.               file ends.  Here is another example that will NOT work:
  6593.  
  6594.                    BAT1:
  6595.  
  6596.  
  6597.  
  6598.           ___________________________________________________________________
  6599.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  108
  6600.  
  6601.                                                        CHAPTER 5 / USING 4DOS
  6602.           ___________________________________________________________________
  6603.  
  6604.  
  6605.  
  6606.                    rem  do something here
  6607.                    gosub sub1
  6608.                    quit
  6609.                    :sub1
  6610.                    rem  do something else here
  6611.                    if [some condition] BAT2
  6612.                    return
  6613.  
  6614.  
  6615.                    BAT2:
  6616.  
  6617.                    rem  do some more work
  6618.                    BAT1
  6619.  
  6620.               If the condition near the end of BAT1 is true, then BAT2 is
  6621.               launched.  But BAT2 ends by restarting BAT1.  The original
  6622.               BAT1's subroutine is still pending.  Since 4DOS has no way to
  6623.               detect this infinite loop, it will eventually suffer a stack
  6624.               overflow and hang the system.  If you do want to chain from
  6625.               one batch file to another, set an environment variable inside
  6626.               the GOSUB block and then use that variable outside the block
  6627.               to see whether you should CALL another batch file.
  6628.  
  6629.  
  6630.  
  6631.  
  6632.  
  6633.  
  6634.  
  6635.  
  6636.  
  6637.  
  6638.  
  6639.  
  6640.  
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.           ___________________________________________________________________
  6656.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  109
  6657.  
  6658.                                                CHAPTER 6 / OPTIONS AND TUNING
  6659.           ___________________________________________________________________
  6660.  
  6661.  
  6662.  
  6663.           ## CHAPTER 6 / OPTIONS AND TUNING
  6664.  
  6665.  
  6666.           Normally, the 4DOS install program will properly set up your system
  6667.           to run 4DOS.  It must, however, make certain assumptions about your
  6668.           computer and the way that you will use 4DOS.  This chapter explains
  6669.           how you can tune 4DOS to make it as efficient and as useful as
  6670.           possible in your computing environment.
  6671.  
  6672.           Nearly everything in this chapter is for advanced users and those
  6673.           with unusual needs.  If 4DOS works the way you want it to after the
  6674.           automatic installation, you can skip this chapter.  You may,
  6675.           however, want to skim this material to see what options are
  6676.           available.
  6677.  
  6678.  
  6679.           Configuration Files
  6680.  
  6681.               4DOS uses five configuration files.  Two are for general DOS
  6682.               configuration;  the other three are unique to 4DOS.  The
  6683.               general DOS files are CONFIG.SYS and AUTOEXEC.BAT.  The
  6684.               specialized 4DOS files are called 4START.BTM, 4EXIT.BTM, and
  6685.               4DOS.INI.  These five files are discussed in order in this
  6686.               section.
  6687.  
  6688.             ! Anytime you change a configuration file, a typographical
  6689.               mistake or other error could make your system lock up or run
  6690.               erratically.  Before you make any changes to any of these
  6691.               files, we strongly urge you to take some precautions.
  6692.  
  6693.               First, create a boot-up floppy diskette (you can use the
  6694.               FORMAT /S command) and make sure that you can use it to boot
  6695.               your computer.  Second, make a backup copy of all five
  6696.               configuration files.  You might want to create copies that
  6697.               have the same base name plus an extension of .BAK.  Copy the
  6698.               .BAK files to your boot-up floppy for safe keeping.  You also
  6699.               might want to make a copy of your computer's SETUP information
  6700.               (on 80286, 386, and 486 computers) and save it on this floppy.
  6701.               If the battery that keeps that data in your computer fails,
  6702.               this file will be invaluable after you install a new battery.
  6703.               A short text file should be sufficient.
  6704.  
  6705.               With these two precautions, if something goes wrong, you will
  6706.               be able to boot with your floppy diskette and copy the files
  6707.               back to their original names.  You'll only have to spend a few
  6708.               minutes recovering your system.  You probably will want to
  6709.               follow the same precautions each time you install a new
  6710.  
  6711.  
  6712.           ___________________________________________________________________
  6713.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  110
  6714.  
  6715.                                                CHAPTER 6 / OPTIONS AND TUNING
  6716.           ___________________________________________________________________
  6717.  
  6718.  
  6719.               application program that changes your DOS or 4DOS
  6720.               configuration files.
  6721.  
  6722.  
  6723.           Setting up CONFIG.SYS
  6724.  
  6725.               The CONFIG.SYS file contains instructions for DOS to execute
  6726.               before it loads a command processor.  Only one line in the
  6727.               CONFIG.SYS file affects 4DOS.  It tells DOS to use 4DOS as the
  6728.               command processor instead of COMMAND.COM.  The format of this
  6729.               line is:
  6730.  
  6731.                    SHELL=d:\path\4DOS.COM [d:\path] [@d:\path\inifile]
  6732.                     [/E:nnnn] [/F] [/P] [//iniline]...  [command]
  6733.  
  6734.               "SHELL=" identifies this line as defining the command
  6735.               processor that DOS will load after it finishes executing the
  6736.               commands in CONFIG.SYS.  It is required.
  6737.  
  6738.               If 4DOS is not in the root directory of the boot drive,
  6739.               replace the first "d:\path\" (immediately after "SHELL=") with
  6740.               the 4DOS drive and directory (if you are using DOS 2.x, 4DOS
  6741.               must be in the root directory of the boot drive).  The drive
  6742.               and path must be correct or your system won't boot (and you'll
  6743.               be very happy that you made the boot-up floppy we suggested).
  6744.               The remainder of the items on this line are optional.  If they
  6745.               are used, you should not include the square brackets.  In the
  6746.               descriptions below, "d:" means a drive letter and "\path"
  6747.               means a subdirectory name.
  6748.  
  6749.               d:\path      This is the "d:\path" option shown in square
  6750.                            brackets above (not the "d:\path" immediately
  6751.                            after "SHELL=").  It sets the drive and directory
  6752.                            where 4DOS is stored.  4DOS uses this path to set
  6753.                            the COMSPEC environment variable.  When running
  6754.                            under MS-DOS or PC-DOS 3.0 or above, 4DOS will
  6755.                            normally find itself automatically and this
  6756.                            option will not be needed.  When running under
  6757.                            DR-DOS this option is required unless 4DOS.COM is
  6758.                            in the root directory of the boot drive.  When
  6759.                            4DOS is running as the primary command processor,
  6760.                            you can tell if COMSPEC has been set correctly by
  6761.                            typing the following line at the 4DOS prompt:
  6762.  
  6763.                                    echo %comspec
  6764.  
  6765.                            If 4DOS has properly located itself, the location
  6766.                            of 4DOS.COM will be correctly displayed.  If the
  6767.  
  6768.  
  6769.           ___________________________________________________________________
  6770.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  111
  6771.  
  6772.                                                CHAPTER 6 / OPTIONS AND TUNING
  6773.           ___________________________________________________________________
  6774.  
  6775.  
  6776.                            COMSPEC is incorrect, you can set it yourself in
  6777.                            AUTOEXEC.BAT, or add this "d:\path" option on the
  6778.                            SHELL= line.
  6779.  
  6780.               @d:\path\inifile
  6781.                            This option sets the path and name of the
  6782.                            4DOS.INI file, which is discussed below.  If the
  6783.                            INI file is in the same directory as 4DOS.COM, or
  6784.                            is in the root directory of the boot drive, and
  6785.                            is named 4DOS.INI, or if you aren't using an INI
  6786.                            file at all, then this option is not needed.
  6787.                            Otherwise, it must be included.
  6788.  
  6789.               /E:nnnn      This option sets the size of the environment, in
  6790.                            bytes.  If you don't use this option, 4DOS will
  6791.                            allocate 512 bytes for the environment.  You can
  6792.                            use any value from 256 to 32000 as the
  6793.                            environment size.  For example, to set an
  6794.                            environment of 1,000 bytes, you would enter the
  6795.                            option this way:
  6796.  
  6797.                                    /E:1000
  6798.  
  6799.                            You can also set the environment size with the
  6800.                            Environment directive in the 4DOS.INI file (see
  6801.                            below).
  6802.  
  6803.               /F           This option tells 4DOS to automatically provide a
  6804.                            Fail response to all critical errors, without
  6805.                            prompting or waiting for a user response.  It is
  6806.                            rarely used except on systems that must run
  6807.                            unattended, like bulletin boards.  We do not
  6808.                            recommend use of this option on a normal system,
  6809.                            because you will not have a chance to react to a
  6810.                            critical error and correct the problem that
  6811.                            caused it.  For more information on critical
  6812.                            errors see page 151.  /F only affects critical
  6813.                            errors detected by 4DOS, and will not affect
  6814.                            critical error handling for many application
  6815.                            programs which perform this function themselves.
  6816.  
  6817.               /P           This option tells 4DOS to load permanently and to
  6818.                            run AUTOEXEC.BAT.  When 4DOS is loaded from the
  6819.                            SHELL= command in CONFIG.SYS, it will detect that
  6820.                            it is the primary shell and set the /P option
  6821.                            automatically.  Under very rare circumstances you
  6822.                            may want to load 4DOS permanently and have it run
  6823.                            AUTOEXEC even though you are not loading it from
  6824.  
  6825.  
  6826.           ___________________________________________________________________
  6827.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  112
  6828.  
  6829.                                                CHAPTER 6 / OPTIONS AND TUNING
  6830.           ___________________________________________________________________
  6831.  
  6832.  
  6833.                            CONFIG.SYS; in such cases you must set /P
  6834.                            yourself.  4DOS will not run AUTOEXEC.BAT without
  6835.                            a /P.  Do not use this option in secondary
  6836.                            shells, or you will be unable to return to the
  6837.                            primary shell.
  6838.  
  6839.               //iniline    This option tells 4DOS to treat the text
  6840.                            appearing between the // and the next space or
  6841.                            tab as a 4DOS.INI directive (see page 119 for
  6842.                            information on 4DOS.INI directives).  The
  6843.                            directive should be in the same format as a line
  6844.                            in 4DOS.INI, but may not contain spaces, tabs, or
  6845.                            comments.  Directives on the SHELL= line override
  6846.                            any corresponding directive in 4DOS.INI.  This is
  6847.                            a convenient way to place one or two simple
  6848.                            directives on the SHELL= line without having to
  6849.                            modify or create a 4DOS.INI file, but is
  6850.                            primarily intended for use in secondary shells
  6851.                            (see below).
  6852.  
  6853.               command      This option tells 4DOS to run the command
  6854.                            included on the SHELL= line.  The command will be
  6855.                            run after 4START and AUTOEXEC.BAT but before
  6856.                            displaying the prompt.  It can be any valid
  6857.                            alias, internal or external command, or batch
  6858.                            file, and can include multiple commands (but see
  6859.                            the Caution below).  All other startup options
  6860.                            (such as /F and /P) must be placed before the
  6861.                            command, because 4DOS will treat characters after
  6862.                            the command as part of the command and not as
  6863.                            additional startup options.  Use this option if
  6864.                            you want 4DOS to run a file other than
  6865.                            AUTOEXEC.BAT when your system boots:  simply
  6866.                            rename AUTOEXEC.BAT and place the new name,
  6867.                            including its full path, at the end of the SHELL=
  6868.                            line.
  6869.  
  6870.  
  6871.               Caution
  6872.  
  6873.             ! There is a bug in all versions of MS-DOS and PC-DOS from 2.0
  6874.               through 4.01.  In all these versions, the SHELL= line in the
  6875.               CONFIG.SYS file may not contain more than 31 characters
  6876.               following the name of the shell program (i.e., beginning with
  6877.               the space after the "M" in "4DOS.COM").  If the line is too
  6878.               long, the options will not be passed properly to 4DOS and a
  6879.               variety of errors can occur.  You can set all necessary 4DOS
  6880.               options without exceeding this limit, especially if you put
  6881.  
  6882.  
  6883.           ___________________________________________________________________
  6884.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  113
  6885.  
  6886.                                                CHAPTER 6 / OPTIONS AND TUNING
  6887.           ___________________________________________________________________
  6888.  
  6889.  
  6890.               4DOS.COM and 4DOS.INI in the root directory of your boot
  6891.               drive.  This limit is not present in MS-DOS 5.0 and above or
  6892.               in DR-DOS.
  6893.  
  6894.  
  6895.               4DOS and DOS 2
  6896.  
  6897.               We recommend using DOS 3.1 or above, but 4DOS can be used with
  6898.               DOS 2.  The only special consideration is that 4DOS must be
  6899.               loaded differently under DOS 2.x, because certain DOS 2
  6900.               functions require that COMMAND.COM be loaded as the primary
  6901.               command processor.  Therefore, you must load COMMAND.COM first
  6902.               and then 4DOS.  Assuming that all files are in the root
  6903.               directory of your boot drive, the SHELL= line in DOS 2.x
  6904.               should look like this:
  6905.  
  6906.                    shell=command.com /c 4DOS [options]
  6907.  
  6908.               Note that due to the "/c 4DOS" on the SHELL line, fewer
  6909.               options can be used before running into the 31-character
  6910.               limit.  You must, however, use the /P option, or AUTOEXEC.BAT
  6911.               will not run.  4DOS will not automatically detect that it is
  6912.               the primary shell and set /P for you when run under DOS 2.
  6913.  
  6914.  
  6915.               Startup Options for Secondary Shells
  6916.  
  6917.               In most cases, secondary shells do not use or require any of
  6918.               the startup options defined for the primary shell in
  6919.               CONFIG.SYS.  Usually, you can only set explicit options for a
  6920.               4DOS secondary shell when you define a 4DOS window in a
  6921.               multitasking system such as Back & Forth, DESQview, Windows,
  6922.               or the MS-DOS shell (DOSSHELL); or in rare cases when you run
  6923.               a secondary copy of 4DOS directly from the command line.  If
  6924.               you do need to set options for secondary shells, you can use
  6925.               any of the following:
  6926.  
  6927.               @d:\path\inifile
  6928.                            Set INI file name, as in CONFIG.SYS (see above).
  6929.                            This option is not necessary if you want 4DOS to
  6930.                            use the same INI file that you used for the
  6931.                            primary shell, as values from that file --
  6932.                            including those in its [Secondary] section --
  6933.                            will be passed automatically to secondary shells.
  6934.  
  6935.               /E:nnnn      Set the environment size, as in CONFIG.SYS (see
  6936.                            above).
  6937.  
  6938.  
  6939.  
  6940.           ___________________________________________________________________
  6941.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  114
  6942.  
  6943.                                                CHAPTER 6 / OPTIONS AND TUNING
  6944.           ___________________________________________________________________
  6945.  
  6946.  
  6947.  
  6948.               /F           Force an automatic "Fail" on critical error, as
  6949.                            in CONFIG.SYS (see above).
  6950.  
  6951.               //iniline    This option tells 4DOS to treat the text
  6952.                            appearing between the // and the next space or
  6953.                            tab as a 4DOS.INI directive (see page 119 for
  6954.                            more information on 4DOS.INI directives).  The
  6955.                            directive should be in the same format as a line
  6956.                            in 4DOS.INI, but may not contain spaces, tabs, or
  6957.                            comments.  Directives on the SHELL= line override
  6958.                            any corresponding directive in 4DOS.INI.  This
  6959.                            allows you to use 4DOS.INI directives directly on
  6960.                            the command line when starting 4DOS in a window
  6961.                            of a multitasking system, rather than having to
  6962.                            create separate copies of 4DOS.INI to accommodate
  6963.                            small configuration changes in different windows.
  6964.  
  6965.               [/C | /K] command
  6966.                            This option tells 4DOS to run the command
  6967.                            included on the line.  The command will be run
  6968.                            after 4START but before any command prompt is
  6969.                            displayed.  It can be any valid alias, internal
  6970.                            or external command, or batch file, and can
  6971.                            include multiple commands.  Use this option if
  6972.                            you want 4DOS to run a batch file or execute a
  6973.                            command when it starts, for example to run a
  6974.                            specific batch file when 4DOS is started in a
  6975.                            window of a multitasking system.
  6976.  
  6977.                            When the command is preceded by a /C, 4DOS will
  6978.                            execute the command and then exit and return to
  6979.                            the parent program.  /C is used by some
  6980.                            applications to start the command processor, run
  6981.                            one command, and the return to the application.
  6982.                            This option can be used when 4DOS is run as a
  6983.                            secondary shell, but never in the SHELL statement
  6984.                            in the CONFIG.SYS file.
  6985.  
  6986.                            The /K switch has no effect; using it is the same
  6987.                            as placing the command (without a /C or /K) at
  6988.                            the end of the startup command line.  It is
  6989.                            included only for compatibility with OS/2 2.0's
  6990.                            COMMAND.COM.
  6991.  
  6992.  
  6993.  
  6994.  
  6995.  
  6996.  
  6997.           ___________________________________________________________________
  6998.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  115
  6999.  
  7000.                                                CHAPTER 6 / OPTIONS AND TUNING
  7001.           ___________________________________________________________________
  7002.  
  7003.  
  7004.  
  7005.  
  7006.           Using AUTOEXEC.BAT
  7007.  
  7008.               If 4DOS is the primary command processor, it is up and running
  7009.               before AUTOEXEC.BAT is executed.  You generally won't need to
  7010.               make any changes to AUTOEXEC.BAT to make it run properly under
  7011.               4DOS, although once you get used to some of 4DOS's batch file
  7012.               enhancements, you may want to use them to streamline AUTOEXEC.
  7013.  
  7014.               If you want to use the 4DOS KEYSTACK command, you will
  7015.               normally load the program KSTACK.COM from your AUTOEXEC.BAT
  7016.               file.  To do so, include the following line in your file.  Its
  7017.               location in the file is unimportant as long as you place it
  7018.               before any KEYSTACK commands:
  7019.  
  7020.                    d:\path\kstack.com
  7021.  
  7022.               Replace the "d:\path" with the path to the KSTACK.COM program,
  7023.               which will normally be stored in your 4DOS directory.
  7024.  
  7025.               You may want to use AUTOEXEC.BAT to configure 4DOS the way you
  7026.               want it by setting some of the environment variables that 4DOS
  7027.               uses.  You may also want to include a SETDOS command (see page
  7028.               301) to set configuration variables (most of these variables
  7029.               can also be set in the 4DOS.INI file discussed below).  All of
  7030.               these settings are optional.
  7031.  
  7032.               4DOS uses seven environment variables.  Five of the seven (all
  7033.               except PATH and PROMPT) are created with the SET command (see
  7034.               page 298) using this format:
  7035.  
  7036.                    set name=value
  7037.  
  7038.               The seven variables and their uses are explained below:
  7039.  
  7040.                    COMSPEC:  The COMSPEC variable is the path and filename
  7041.                    that programs use to launch a secondary shell.  Normally,
  7042.                    this will be set automatically by 4DOS as it installs
  7043.                    itself.  However, in rare circumstances you may wish to
  7044.                    load 4DOS.COM for secondary shells from a directory other
  7045.                    than the one it's in when you boot (for example, from a
  7046.                    RAM disk).  In these cases, you will need to reset the
  7047.                    COMSPEC variable.  For example, if you want to load
  7048.                    secondary copies of 4DOS.COM from the root directory of
  7049.                    drive D, you would use this command:
  7050.  
  7051.                         set comspec=D:\4DOS.COM
  7052.  
  7053.  
  7054.           ___________________________________________________________________
  7055.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  116
  7056.  
  7057.                                                CHAPTER 6 / OPTIONS AND TUNING
  7058.           ___________________________________________________________________
  7059.  
  7060.  
  7061.  
  7062.                    PATH:  The PATH variable lists the directories that 4DOS
  7063.                    should search for executable files that aren't in the
  7064.                    current directory (executable files include .COM, .EXE,
  7065.                    .BTM, and .BAT files and files with executable
  7066.                    extensions).  The PATH variable is normally set with the
  7067.                    PATH command.  See PATH on page 274 for more details.
  7068.  
  7069.                    PROMPT:  The prompt variable defines the 4DOS command
  7070.                    prompt.  It is normally set with the PROMPT command.  See
  7071.                    PROMPT on page 278 for details about the options
  7072.                    available.
  7073.  
  7074.                    TEMP4DOS:  This variable contains the drive and directory
  7075.                    that 4DOS will use to store temporary pipe files (see
  7076.                    page 66).  If you have a RAM disk, piping will be faster
  7077.                    if you direct 4DOS to use it for the pipe files.  This
  7078.                    variable should hold a single path.  The path can be
  7079.                    terminated with a backslash [\] if you choose, but this
  7080.                    is not required.  For example, to direct pipe temporary
  7081.                    files to the TEMP directory on drive D:
  7082.  
  7083.                         set temp4dos=d:\temp
  7084.  
  7085.                    TEMP:  If TEMP4DOS does not exist, 4DOS looks for this
  7086.                    variable to find the path for temporary pipe files (if
  7087.                    neither exists, 4DOS uses the root directory of the drive
  7088.                    from which it was started).  TEMP is also used by some
  7089.                    other programs to set a path for their temporary files.
  7090.                    The format of TEMP is the same as TEMP4DOS.
  7091.  
  7092.                    COLORDIR:  This variable sets the colors that 4DOS will
  7093.                    use for directories displayed by the DIR and SELECT
  7094.                    commands.  See those commands (page 211 and 293) for
  7095.                    details about COLORDIR.
  7096.  
  7097.                    CDPATH:  This variable defines default directories to be
  7098.                    used by the CD and CDD commands, and by automatic
  7099.                    directory changes.  If CD, CDD, or an automatic directory
  7100.                    entry cannot find the path you specify on the command
  7101.                    line, 4DOS will try appending the command line path to
  7102.                    each path in this variable.  For example, you may have a
  7103.                    C:\LETTERS directory that has subdirectories named JAN,
  7104.                    FEB, MARCH, etc.  You can put C:\LETTERS into CDPATH and
  7105.                    get to the FEB directory from anywhere on your system by
  7106.                    typing CDD FEB or FEB\.
  7107.  
  7108.  
  7109.  
  7110.  
  7111.           ___________________________________________________________________
  7112.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  117
  7113.  
  7114.                                                CHAPTER 6 / OPTIONS AND TUNING
  7115.           ___________________________________________________________________
  7116.  
  7117.  
  7118.  
  7119.                    The format of the CDPATH variable is the same as the PATH
  7120.                    variable:  a list of directories separated by semicolons.
  7121.                    For example:
  7122.  
  7123.                         set cdpath=c:\letters;c:\data;c:\memos
  7124.  
  7125.  
  7126.           Using 4START and 4EXIT
  7127.  
  7128.               4DOS runs two special batch files automatically, 4START.BTM
  7129.               and 4EXIT.BTM (you can make them .BAT files, if you prefer).
  7130.               4START is executed whenever 4DOS is started as a primary or
  7131.               secondary shell.  In the primary shell, it is executed before
  7132.               AUTOEXEC.BAT.  If 4DOS is started as a secondary shell with
  7133.               the /C command option, 4START is executed before the command.
  7134.  
  7135.               A 4START file is normally very short.  You should NOT load any
  7136.               memory-resident programs (TSRs) from 4START because they will
  7137.               be reloaded every time a secondary shell is started.
  7138.               Normally, 4START is used to vary the PROMPT setting or screen
  7139.               colors from shell to shell.  The LOG command is sometimes used
  7140.               in 4START to record that a new shell has begun.  A PAUSE
  7141.               command inserted temporarily in 4START will let you see if a
  7142.               particular program is running a secondary shell with the /C
  7143.               command option to accomplish some of its own work.  Do not
  7144.               load aliases from 4START -- 4DOS passes them along to a
  7145.               secondary shell automatically, so you only need to load them
  7146.               once, in AUTOEXEC.
  7147.  
  7148.               The 4EXIT batch file is executed every time a secondary 4DOS
  7149.               command processor ends.  A secondary shell can end because of
  7150.               an EXIT command or after completing the command specified with
  7151.               a /C command startup option.  Normally, 4EXIT is used to LOG a
  7152.               record that the shell has ended.  You might also use 4EXIT to
  7153.               view the results of the command that an application has given
  7154.               to 4DOS, or to save the history accumulated during that shell
  7155.               with the HISTORY command with output redirected to a file.
  7156.  
  7157.               4DOS looks for the 4START and 4EXIT batch files in three
  7158.               places:
  7159.  
  7160.                    *  If the 4DOS.INI file has a 4StartPath entry, 4DOS will
  7161.                       use it, and will not look elsewhere.
  7162.  
  7163.                    *  If 4StartPath is not set, 4DOS will look in the
  7164.                       directory where 4DOS.COM is stored.  For the primary
  7165.                       shell, 4DOS determines this directory automatically, or
  7166.  
  7167.  
  7168.           ___________________________________________________________________
  7169.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  118
  7170.  
  7171.                                                CHAPTER 6 / OPTIONS AND TUNING
  7172.           ___________________________________________________________________
  7173.  
  7174.  
  7175.                       you can set it yourself by placing a COMSPEC directory
  7176.                       name on the SHELL= line in CONFIG.SYS (see page 111).
  7177.                       For secondary shells, the directory is determined from
  7178.                       the COMSPEC environment variable (see page 116).
  7179.  
  7180.                    *  If the COMSPEC directory search fails, 4DOS will look
  7181.                       in the root directory of the boot drive.
  7182.  
  7183.               The easiest way to make sure that 4DOS finds the 4START and
  7184.               4EXIT batch files is to specify their location with the
  7185.               4StartPath directive in the 4DOS.INI file (see below).  If you
  7186.               don't, put 4START and 4EXIT in the root directory of the boot
  7187.               drive.  If the COMSPEC drive is not the same as the boot
  7188.               drive, then you should also put a copy of 4START and 4EXIT in
  7189.               the root directory of the COMSPEC drive.
  7190.  
  7191.  
  7192.           Using the 4DOS.INI File
  7193.  
  7194.               4DOS uses a file of initialization information called the
  7195.               4DOS.INI file.  You can create, add to, and edit this file
  7196.               with any ASCII text editor to set 4DOS options and alter the
  7197.               way that 4DOS works.  The 4DOS installation program will
  7198.               create a 4DOS.INI file for you if one does not already exist
  7199.               on your system.  Most of this section explains the options
  7200.               available through 4DOS.INI.  You only need to include entries
  7201.               in 4DOS.INI for any settings that you want to change from
  7202.               their default values.  If you are happy with all of 4DOS's
  7203.               default values, you don't need a 4DOS.INI file at all.
  7204.  
  7205.               Some settings in 4DOS.INI are initialized when you install
  7206.               4DOS, so you may have a 4DOS.INI file even if you didn't
  7207.               create one yourself.  You should not delete this file unless
  7208.               you've checked carefully to be sure that you don't need any of
  7209.               the settings the initialization program put there.
  7210.  
  7211.               When 4DOS is loaded as the primary shell, it searches for the
  7212.               4DOS.INI file in three places:
  7213.  
  7214.                    *  If there is an "@d:\path\inifile" option on the SHELL=
  7215.                       line in CONFIG.SYS (see page 112), 4DOS will use the
  7216.                       path and file name specified there, and will not look
  7217.                       elsewhere.
  7218.  
  7219.                    *  If there is no INI file path or name on the SHELL=
  7220.                       line, 4DOS will look in the same directory where
  7221.                       4DOS.COM is stored (this is the "normal" location for
  7222.                       4DOS.INI).  4DOS determines this directory
  7223.  
  7224.  
  7225.           ___________________________________________________________________
  7226.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  119
  7227.  
  7228.                                                CHAPTER 6 / OPTIONS AND TUNING
  7229.           ___________________________________________________________________
  7230.  
  7231.  
  7232.                       automatically, or you can set it yourself by placing a
  7233.                       COMSPEC directory name on the SHELL= line in CONFIG.SYS
  7234.                       (see page 111).
  7235.  
  7236.                    *  If the COMSPEC directory search fails, 4DOS will look
  7237.                       in the root directory of the boot drive.
  7238.  
  7239.               When 4DOS is loaded as a secondary shell, it does not search
  7240.               for the 4DOS.INI file.  Instead, it reprocesses the file used
  7241.               for the primary shell (if necessary), then processes any
  7242.               "@d:\path\inifile" option on the secondary shell command line
  7243.               (see page 114).  You can override this behavior with the
  7244.               NextINIFile directive (see page 140).
  7245.  
  7246.               Most lines in the 4DOS.INI file consist of a one-word
  7247.               directive, an equal sign [=], and a value.  For example, in
  7248.               the following line, the word "Environment" is the directive
  7249.               and "2048" is the value:
  7250.  
  7251.                    Environment = 2048
  7252.  
  7253.               Any spaces before or after the equal sign are ignored.  The
  7254.               directive name may be abbreviated to the minimum length needed
  7255.               to make it unique; 4DOS will display an error if the name you
  7256.               use is unknown or ambiguous.  We recommend that you use full-
  7257.               length directive names, since future versions of 4DOS may add
  7258.               directives that would make your abbreviations ambiguous and
  7259.               cause an error.
  7260.  
  7261.               If you have a long string to enter in 4DOS.INI (for example,
  7262.               for the ColorDir directive), you must enter it all on one
  7263.               line.  Strings cannot be "continued" to a second line.  Each
  7264.               line may be up to 511 characters long.
  7265.  
  7266.               The format of the value part of a directive line depends on
  7267.               the individual directive.  It may be a numeric value, a single
  7268.               character, a choice (like "Yes" or "No"), a color setting, a
  7269.               key name, a path, a filename, or a text string.  The value
  7270.               begins with the first non-blank character after the equal sign
  7271.               and ends at the end of the line or the beginning of a comment.
  7272.  
  7273.               Blank lines are ignored in the 4DOS.INI file and can be used
  7274.               to separate groups of directives.  You can place comments in
  7275.               the file by beginning a line with a semicolon [;].  You can
  7276.               also place comments at the end of any line except one
  7277.               containing a text string value.  To do so, enter at least one
  7278.               space or tab after the value, a semicolon, and your comment,
  7279.               like this:
  7280.  
  7281.  
  7282.           ___________________________________________________________________
  7283.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  120
  7284.  
  7285.                                                CHAPTER 6 / OPTIONS AND TUNING
  7286.           ___________________________________________________________________
  7287.  
  7288.  
  7289.  
  7290.                    Environment = 2048        ;set standard environment size
  7291.  
  7292.               If you try to place a comment at the end of a string value,
  7293.               the comment will become part of the string and will probably
  7294.               cause an error.
  7295.  
  7296.               When 4DOS detects an error while processing the 4DOS.INI file,
  7297.               it displays an error message, ignores the line that caused the
  7298.               error, and prompts you to press a key to continue processing
  7299.               the file.  This allows you to note any errors before the
  7300.               startup process continues.  The directive in error will retain
  7301.               its previous or default value.  Only the most catastrophic
  7302.               errors (like a disk read failure) will cause 4DOS to ignore
  7303.               all or a large part of the 4DOS.INI file.  If you don't want
  7304.               4DOS to pause after each error, use a "PauseOnError = No"
  7305.               directive at the beginning of the file.
  7306.  
  7307.               The 4DOS.INI file has two sections, which are identified by a
  7308.               name in square brackets on a line by itself.  The section
  7309.               names are
  7310.  
  7311.                    [Primary]:  Directives in this section will be used when
  7312.                    4DOS is running as the primary shell.  The same values
  7313.                    will be passed automatically to all secondary shells,
  7314.                    unless overridden by a directive with the same name in
  7315.                    the [Secondary] section.
  7316.  
  7317.                    [Secondary]:  Directives in this section are used in
  7318.                    secondary shells only, and override any corresponding
  7319.                    primary shell settings.  For example, if your 4DOS.INI
  7320.                    file contains the lines:
  7321.  
  7322.                         ScreenRows = 25
  7323.                         [Secondary]
  7324.                         ScreenRows = 50
  7325.  
  7326.                    then 4DOS will assume that you have 25 rows on the screen
  7327.                    in the primary shell and 50 lines in all secondary
  7328.                    shells.
  7329.  
  7330.               Lines that precede a section name are used in both primary and
  7331.               secondary shells.
  7332.  
  7333.               The SETDOS command can override several of the 4DOS.INI file
  7334.               directives.  For example, the number of rows on the screen can
  7335.               be adjusted with SETDOS /R.  The correspondence between SETDOS
  7336.  
  7337.  
  7338.  
  7339.           ___________________________________________________________________
  7340.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  121
  7341.  
  7342.                                                CHAPTER 6 / OPTIONS AND TUNING
  7343.           ___________________________________________________________________
  7344.  
  7345.  
  7346.               options and INI file directives is noted under each directive
  7347.               below, and under each option of the SETDOS command.
  7348.  
  7349.               Secondary shells automatically inherit the configuration
  7350.               settings currently in effect in the previous shell.  If values
  7351.               have been changed by SETDOS since 4DOS started, the new values
  7352.               will be passed to the secondary shell.  If the previous
  7353.               shell's INI file had a [Secondary] section, it will then be
  7354.               read and processed.  If not, the previous shell's settings
  7355.               will remain in effect.  For example, if you set BatchEcho to
  7356.               Yes in 4DOS.INI, do not include a [Secondary] section, and use
  7357.               SETDOS /V0 to turn off batch file echoing in the primary
  7358.               shell, then secondary shells will inherit the SETDOS setting,
  7359.               i.e. batch files will default to no echo.
  7360.  
  7361.               If you want to force secondary shells to start with the same
  7362.               value as the primary shell for a particular directive,
  7363.               regardless of any changes made with SETDOS, repeat the
  7364.               directive in the [Secondary] section of 4DOS.INI.  You can
  7365.               also place the directive outside any section of 4DOS.INI, then
  7366.               include an empty [Secondary] section.  The inclusion of a
  7367.               [Secondary] section will force 4DOS to re-read 4DOS.INI, and
  7368.               the directives outside any section will be reprocessed as they
  7369.               apply to both primary and secondary shells.  Because 4DOS.INI
  7370.               is processed after values from the previous shell are
  7371.               inherited, the value in 4DOS.INI will override the inherited
  7372.               value.  Using the BatchEcho example above, either of the
  7373.               following sets of 4DOS.INI directives would work to ensure
  7374.               that BatchEcho is set to Yes in secondary shells:
  7375.  
  7376.                     Same directive                Empty
  7377.                     in both sections              [Secondary]
  7378.                     ----------------              -----------
  7379.                     [Primary]                     BatchEcho = Yes
  7380.                     BatchEcho = Yes                 ... <other
  7381.                      ... <other directives>         ...  directives>
  7382.                     [Secondary]                   [Secondary]
  7383.                     BatchEcho = Yes               <End of File>
  7384.                      ... <other directives>
  7385.  
  7386.               If you start a secondary shell from a task switching program
  7387.               like Windows, DESQview, or Back & Forth, you can specify an
  7388.               alternate location and name for 4DOS.INI by passing the
  7389.               "@d:\path\inifile" option to 4DOS as a command-line parameter
  7390.               (see page 112).  In this case, the configuration settings in
  7391.               the alternate 4DOS.INI file will supersede any settings
  7392.               inherited from the previous shell.  Any values which are not
  7393.               explicitly set in the alternate file will retain the value
  7394.  
  7395.  
  7396.           ___________________________________________________________________
  7397.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  122
  7398.  
  7399.                                                CHAPTER 6 / OPTIONS AND TUNING
  7400.           ___________________________________________________________________
  7401.  
  7402.  
  7403.               they had in the previous shell.  Any [Primary] section in the
  7404.               alternate file will be ignored because it is being run from a
  7405.               secondary shell.
  7406.  
  7407.               The first section below lists the different types of
  7408.               directives.  Subsequent sections list all the individual
  7409.               directives, divided by function and then alphabetically by
  7410.               directive name.  At the end we have included a few examples of
  7411.               how to use 4DOS.INI directives (see page 141).
  7412.  
  7413.  
  7414.               Types of Directives
  7415.  
  7416.               There are 8 types of directives in 4DOS.INI.  When you look at
  7417.               the descriptions below, you can tell the directive type by the
  7418.               way in which the allowable values are shown.
  7419.  
  7420.                    *  Name = nnnn (1234):  This directive takes a numeric
  7421.                       value which replaces the "nnnn."  The default value is
  7422.                       shown in parentheses.
  7423.  
  7424.                    *  Name = c (X):  This directive accepts a single
  7425.                       character as its value.  The default character is shown
  7426.                       in parentheses.  You must type in the actual character,
  7427.                       you can not use a key name.
  7428.  
  7429.                    *  Name = CHOICE1 | Choice2 | ... :  This directive takes
  7430.                       a choice value.  The possible choices are listed,
  7431.                       separated by vertical bars.  The default value is shown
  7432.                       in all upper case letters in the directive description,
  7433.                       but in your file any of the choices can be entered in
  7434.                       upper case or lower case.  The choices can be
  7435.                       abbreviated as long as the abbreviation is unique and
  7436.                       can not cause ambiguity.  For example, if the choices
  7437.                       were shown as "YES | No" then "YES" is the default.
  7438.                       You could enter "Y", "N", "y", or "n"  for the value.
  7439.                       But if the choices are shown as "YES | No | Never" then
  7440.                       you could not use "N" as an abbreviation because it
  7441.                       would be ambiguous.
  7442.  
  7443.                    *  Name = color:  This directive takes a color
  7444.                       specification in the form:
  7445.  
  7446.                         [BRIght] [BLInk] fg ON bg [BORder bc]
  7447.  
  7448.                       Where:
  7449.  
  7450.                          fg is the foreground color.
  7451.  
  7452.  
  7453.           ___________________________________________________________________
  7454.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  123
  7455.  
  7456.                                                CHAPTER 6 / OPTIONS AND TUNING
  7457.           ___________________________________________________________________
  7458.  
  7459.  
  7460.                          bg is the background color.
  7461.                          bc is the border color.
  7462.  
  7463.                       The allowable color names are:
  7464.  
  7465.                         Black         Blue          Green         Red
  7466.                         Magenta       Cyan          Yellow        White
  7467.  
  7468.                       The color names and the keywords BRIGHT, BLINK, and
  7469.                       BORDER can be shortened to three letters.
  7470.  
  7471.                    *  Name = Key:  This directive takes a key specification
  7472.                       in the form:
  7473.  
  7474.                         [Prefix-]Keyname
  7475.  
  7476.                       The key prefix can be left out, or it can be any one of
  7477.                       the following:
  7478.  
  7479.                         Alt        followed by A - Z, 0 - 9, F1 - F12, or
  7480.                                    Bksp
  7481.                         Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  7482.                                    Left, Right, Home, End, PgUp, PgDn, Ins,
  7483.                                    or Del
  7484.                         Shift      followed by F1 - F12 or Tab.
  7485.  
  7486.                       The possible key names are:
  7487.  
  7488.                         A - Z         Enter         PgDn
  7489.                         0 - 9         Up            Home
  7490.                         F1 - F12      Down          End
  7491.                         Esc           Left          Ins
  7492.                         Bksp          Right         Del
  7493.                         Tab           PgUp
  7494.  
  7495.                       All key names must be spelled as shown, and can be
  7496.                       abbreviated as long as the abbreviation is unique and
  7497.                       unambiguous.  Alphabetic keys can be specified in
  7498.                       upper-case or lower-case.  You cannot specify a
  7499.                       punctuation key.
  7500.  
  7501.                       The prefix and key name must be separated by a dash.
  7502.                       For example,
  7503.  
  7504.                         AddFile = Alt-F10    ; This is okay
  7505.                         AddFile = Alt F10    ; The space will cause an error
  7506.  
  7507.  
  7508.  
  7509.  
  7510.           ___________________________________________________________________
  7511.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  124
  7512.  
  7513.                                                CHAPTER 6 / OPTIONS AND TUNING
  7514.           ___________________________________________________________________
  7515.  
  7516.  
  7517.  
  7518.                       If you prefer, you can use a numeric value instead of a
  7519.                       key name.  Use the ASCII code for an ASCII, extended
  7520.                       ASCII, or control character.  Use the scan code
  7521.                       preceded by an at-sign [@] for extended key codes like
  7522.                       F1 or the cursor keys.  In general, you will find it
  7523.                       easier to use the names described above rather than key
  7524.                       numbers.
  7525.  
  7526.                    *  Name = Path:  This directive takes a path
  7527.                       specification, but not a filename.  The path should
  7528.                       include both a drive and path (e.g., C:\4DOS) to avoid
  7529.                       any possible ambiguities.  A trailing backslash [\] at
  7530.                       the end of the path name is acceptable but not
  7531.                       required.  Any default path is described in the text.
  7532.  
  7533.                    *  Name = File:  This directive takes a filename.  We
  7534.                       recommend that you use a full filename including the
  7535.                       drive letter and path to avoid any possible
  7536.                       ambiguities.  Any default filename is described in the
  7537.                       text.
  7538.  
  7539.                    *  Name = Anything else:  This directive takes a string in
  7540.                       the format shown.  The text describes the default value
  7541.                       and any additional requirements for formatting the
  7542.                       string correctly.  No comments are allowed.
  7543.  
  7544.               4DOS contains a fixed-length area for storing strings entered
  7545.               in 4DOS.INI, including file names, paths, and other strings.
  7546.               This area is large and is unlikely to overflow; if it does,
  7547.               you will receive an error message.  If this occurs, reduce the
  7548.               complexity of your 4DOS.INI file or contact our technical
  7549.               support department for assistance.
  7550.  
  7551.  
  7552.               Initialization Directives
  7553.  
  7554.               The directives in this section control how 4DOS starts and
  7555.               where it looks for its files.
  7556.  
  7557.                    4StartPath = Path:  Sets the drive and directory where
  7558.                    4DOS should look for the 4START and 4EXIT batch files.
  7559.  
  7560.                    Alias = nnnn  (1024):  Sets the amount of memory in bytes
  7561.                    allocated for the alias list.  The allowable range of
  7562.                    values is 256 to 32767 bytes.
  7563.  
  7564.  
  7565.  
  7566.  
  7567.           ___________________________________________________________________
  7568.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  125
  7569.  
  7570.                                                CHAPTER 6 / OPTIONS AND TUNING
  7571.           ___________________________________________________________________
  7572.  
  7573.  
  7574.  
  7575.                    AutoExecPath = Path:  Sets the path used to find
  7576.                    AUTOEXEC.BAT if 4DOS is started as a primary shell with
  7577.                    the /P option in CONFIG.SYS (see page 112).  The default
  7578.                    is the root directory of the boot drive.
  7579.  
  7580.                    EnvFree = nnnn  (128):  Sets the minimum amount of memory
  7581.                    in bytes that will be available in the environment for
  7582.                    secondary shells.  4DOS will enlarge the environment for
  7583.                    each secondary shell, if necessary, so that there is at
  7584.                    least this much free environment space when the shell
  7585.                    starts.  The allowable range of values is 128 to 32000
  7586.                    bytes.
  7587.  
  7588.                    Environment = nnnn  (512):  Sets the amount of memory
  7589.                    allocated to the environment in bytes.  The allowable
  7590.                    range of values is 256 to 32000 bytes.
  7591.  
  7592.                    HelpOptions = [/M /Sn /X]:  Sets default options for the
  7593.                    4DOS help system.  See HELP on page 241 for a list of the
  7594.                    available options.
  7595.  
  7596.                    HelpPath = Path:  Sets the path used to find 4HELP.EXE
  7597.                    when F1 is pressed or the HELP command is used.  If this
  7598.                    directive is not used, 4DOS will search the current
  7599.                    directory and each of the directories in the PATH.
  7600.  
  7601.                    History = nnnn  (1024):  Sets the amount of memory
  7602.                    allocated to the history list in bytes.  The allowable
  7603.                    range of values is 256 to 8192 bytes.
  7604.  
  7605.                    LogName = File  (none):  Sets the log file name and/or
  7606.                    path. If only a path is given, 4DOS will use the default
  7607.                    log file name (4DOSLOG).  Using LogName does not turn
  7608.                    logging on, you must still use LOG ON to do so.
  7609.  
  7610.                    PauseOnError = YES | No:  "Yes" tells 4DOS to pause with
  7611.                    the message "Error in 4DOS.INI, press any key to continue
  7612.                    processing" after displaying any error message related to
  7613.                    a specific line in the 4DOS.INI file.  "No" continues
  7614.                    processing with no pause after an error message is
  7615.                    displayed.
  7616.  
  7617.                    Swapping = swap type [, swap type] ...:  Sets the type of
  7618.                    swapping 4DOS should use.  4DOS runs in two parts, a
  7619.                    resident portion that is always in memory and a transient
  7620.                    portion that can be stored in EMS memory, in XMS memory,
  7621.                    on a RAM disk, or on your hard disk while application
  7622.  
  7623.  
  7624.           ___________________________________________________________________
  7625.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  126
  7626.  
  7627.                                                CHAPTER 6 / OPTIONS AND TUNING
  7628.           ___________________________________________________________________
  7629.  
  7630.  
  7631.                    programs are running.  The resident portion uses about 3K
  7632.                    of memory in the primary shell and about 1.5K in
  7633.                    secondary shells.  The transient portion uses about 88K
  7634.                    of memory.  4DOS will perform most quickly if the
  7635.                    transient portion is swapped to the fastest memory or
  7636.                    device available.  See page 49 for explanations of XMS
  7637.                    and EMS memory.
  7638.  
  7639.                    Swapping for the primary shell normally requires about
  7640.                    96K of EMS memory, or 92K of XMS memory or disk space.
  7641.                    Secondary shells normally require 32K of EMS memory, or
  7642.                    28K of XMS memory or disk space.  If you have a large
  7643.                    environment, alias list, or history list, more memory
  7644.                    will be required in both primary and secondary shells.
  7645.                    The EMS requirements are larger because EMS memory is
  7646.                    allocated in 16K increments; 4DOS does not actually use
  7647.                    more memory when swapping to EMS.
  7648.  
  7649.                    The swap type may be:
  7650.  
  7651.                          EMS:  4DOS will swap to EMS expanded memory if it is
  7652.                          available.  You must have expanded memory and an EMS
  7653.                          memory manager (version 3.2 or later) for this
  7654.                          option.
  7655.  
  7656.                          XMS:  4DOS will swap to XMS extended memory if it is
  7657.                          available (you must have an 80286, 386, or 486
  7658.                          computer for this option, and an XMS memory
  7659.                          manager).
  7660.  
  7661.                          d:\path:  4DOS will create a swap file in the drive
  7662.                          and directory specified.  The file will be called
  7663.                          4DOSSWAP.NNN where "NNN" is the shell number (unless
  7664.                          you use the UniqueSwapName directive to generate a
  7665.                          unique swap file name; see page 141).  This swap
  7666.                          file is created as a hidden system file to avoid
  7667.                          accidental deletion and will not be visible with a
  7668.                          normal DIR command.  Swapping to a RAM disk will
  7669.                          generally be somewhat faster than swapping to a hard
  7670.                          disk.  Do not use a floppy disk for swapping because
  7671.                          its performance is likely to be unacceptably slow.
  7672.  
  7673.                          None:  No swapping.  The transient portion of 4DOS
  7674.                          will remain in memory at all times.  This option
  7675.                          will reduce memory available for application
  7676.                          programs by about 90K compared to the other swap
  7677.                          types, and should be used only when no other
  7678.                          swapping options are available.
  7679.  
  7680.  
  7681.           ___________________________________________________________________
  7682.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  127
  7683.  
  7684.                                                CHAPTER 6 / OPTIONS AND TUNING
  7685.           ___________________________________________________________________
  7686.  
  7687.  
  7688.  
  7689.                    You can specify multiple swap types and 4DOS will try
  7690.                    them in the order listed.  Swap type "None" is always
  7691.                    appended to your list of possible swap types as a "last
  7692.                    resort", even if you don't include it explicitly.  This
  7693.                    allows 4DOS to start even if the other swap types you
  7694.                    specify don't work.
  7695.  
  7696.                    For example, if your system has EMS memory and a RAM disk
  7697.                    set up as drive D, the directive:
  7698.  
  7699.                          Swapping = EMS, D:\, C:\SWAP
  7700.  
  7701.                    will tell 4DOS to try EMS memory first, then the RAM
  7702.                    disk, and finally the \SWAP directory on drive C.  If all
  7703.                    of these options fail (because there isn't enough free
  7704.                    space available), the transient portion of 4DOS will
  7705.                    remain in memory (swap type "None").
  7706.  
  7707.                    The default Swapping specification is:
  7708.  
  7709.                          Swapping = EMS, XMS, x:\, None
  7710.  
  7711.                    "x" is the boot drive (for the primary shell) or the
  7712.                    COMSPEC drive (for secondary shells).  (Disk swapping
  7713.                    will not be included as a default if the boot drive is A:
  7714.                    or B:, because floppy disk swapping is too slow to be
  7715.                    useful on most systems.)  The default is usually adequate
  7716.                    for most systems.
  7717.  
  7718.                    UMBEnvironment = Yes | NO:  "Yes" attempts to load the
  7719.                    master environment into a UMB (Upper Memory Block).  This
  7720.                    reduces 4DOS's base memory requirements but may cause
  7721.                    problems with some programs that try to access the master
  7722.                    environment directly.  This option requires a 386 or 486
  7723.                    computer and appropriate support software, or an 8086/88
  7724.                    or 80286 computer and appropriate support hardware and
  7725.                    software.  (See pages 50 and 144 for more information on
  7726.                    UMBs.)
  7727.  
  7728.                    UMBLoad = Yes | NO:  "Yes" attempts to load the resident
  7729.                    portion of 4DOS into a UMB (Upper Memory Block).  This
  7730.                    reduces the size of the resident portion in base memory
  7731.                    from about 3K bytes to 256 bytes, plus the environment
  7732.                    size (unless you have also enabled UMBEnvironment).  This
  7733.                    option requires a 386 or 486 computer and appropriate
  7734.                    support software, or an 8086/88 or 80286 computer and
  7735.  
  7736.  
  7737.  
  7738.           ___________________________________________________________________
  7739.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  128
  7740.  
  7741.                                                CHAPTER 6 / OPTIONS AND TUNING
  7742.           ___________________________________________________________________
  7743.  
  7744.  
  7745.                    appropriate support hardware and software.  (See pages 50
  7746.                    and 144 for more information on UMBs.)
  7747.  
  7748.  
  7749.               Configuration Directives
  7750.  
  7751.               These directives control the way that 4DOS operates.  Some can
  7752.               be changed with the SETDOS command while 4DOS is running.  Any
  7753.               corresponding SETDOS command is listed in the description of
  7754.               each directive;  information on SETDOS is on page 301.
  7755.  
  7756.                    ANSI = AUTO | Yes | No:  Tells 4DOS whether an ANSI
  7757.                    driver is installed and should be used for the CLS and
  7758.                    COLOR commands.  4DOS normally determines this itself,
  7759.                    but if you are using a non-standard ANSI driver or your
  7760.                    loading sequence is unusual, you may need to explicitly
  7761.                    inform 4DOS.  Also see SETDOS /A.
  7762.  
  7763.                    BatchEcho = YES | No:  Sets the default batch ECHO mode.
  7764.                    "Yes" enables echoing of all batch file commands unless
  7765.                    ECHO is explicitly set off in the batch file.  "No"
  7766.                    disables batch file echoing unless ECHO is explicitly set
  7767.                    on.  Also see SETDOS /V.
  7768.  
  7769.                    BeepFreq = nnnn  (440):  Sets the default BEEP command
  7770.                    frequency in Hz.  This is also the frequency for 4DOS
  7771.                    "error" beeps (if you press an illegal key, for example).
  7772.                    To disable all 4DOS error beeps set this or BeepLength to
  7773.                    0;  if you do the BEEP command will still be operable,
  7774.                    but will not produce sound unless you explicitly specify
  7775.                    the frequency and duration.
  7776.  
  7777.                    BeepLength = nnnn  (2):  Sets the default BEEP length in
  7778.                    system clock ticks (approximately 1/18 of a second per
  7779.                    tick).  BeepLength is also the default length for 4DOS
  7780.                    "error" beeps (if you press an illegal key, for example).
  7781.  
  7782.                    CursorIns = nnnn  (100):  This is the shape of the cursor
  7783.                    for insert mode during command line editing and all
  7784.                    commands which accept line input (DESCRIBE, ESET, etc.).
  7785.                    The size is a percentage of the total character cell
  7786.                    size, between 0% and 100%.  Because of the way video
  7787.                    BIOSes map the cursor shape, you may not get a smooth
  7788.                    progression in cursor shapes as CursorIns and CursorOver
  7789.                    change.  Also see SETDOS /S.
  7790.  
  7791.                    CursorOver = nnnn  (10):  This is the shape of the cursor
  7792.                    for overtype mode during command line editing and all
  7793.  
  7794.  
  7795.           ___________________________________________________________________
  7796.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  129
  7797.  
  7798.                                                CHAPTER 6 / OPTIONS AND TUNING
  7799.           ___________________________________________________________________
  7800.  
  7801.  
  7802.                    commands which accept line input.  The size is a
  7803.                    percentage of the total character cell size, between 0%
  7804.                    and 100%.  Also see SETDOS /S.
  7805.  
  7806.                    CommandSep = c  (^):  This is the character used to
  7807.                    separate multiple commands on the same line.  You cannot
  7808.                    use any of the redirection characters (| > < ) or any of
  7809.                    the whitespace characters (space, tab, comma, or equal
  7810.                    sign).  Also see SETDOS /C.
  7811.  
  7812.                    DescriptionMax = nnnn (40):  Controls the description
  7813.                    length limit for DESCRIBE (see page 209).  The allowable
  7814.                    range is 20 to 120 characters.
  7815.  
  7816.                    EditMode = Insert | OVERSTRIKE:  This directive lets you
  7817.                    start the command line editor in either insert or
  7818.                    overstrike mode.  Also see SETDOS /M.
  7819.  
  7820.                    EscapeChar = c  (Ctrl-X):  Sets the character used to
  7821.                    suppress the normal meaning of the following character.
  7822.                    See page 94 for a description of the escape character and
  7823.                    special escape sequences.  You cannot use any of the
  7824.                    redirection characters (| > < ) or the whitespace
  7825.                    characters (space, tab, comma, or equal sign) as the
  7826.                    escape character.  Also see SETDOS /E.
  7827.  
  7828.                    HistMin = nnnn  (0):  Sets the minimum command line size
  7829.                    to save in the command history list.  Any command line
  7830.                    whose length is less than this value will not be saved.
  7831.                    Legal values range from 0 (save everything) to 256
  7832.                    (disable all command history saves).
  7833.  
  7834.                    HistWinHeight = nn (12):  Sets the height of the command
  7835.                    line history window in lines, including the border.
  7836.                    Legal values range from 5 to the height of your screen;
  7837.                    any value which would cause the bottom of the window to
  7838.                    be off the screen will be adjusted so that the entire
  7839.                    window remains on the screen.
  7840.  
  7841.                    HistWinLeft = nn (40):  Sets the horizontal position of
  7842.                    the left side of the command line history window.  Legal
  7843.                    values range from 0 (the left edge of the screen) to the
  7844.                    number of columns on your screen minus 10.  Any value
  7845.                    which would cause the right side of a minimum-width
  7846.                    window to be off the screen will be adjusted so that the
  7847.                    entire window remains on the screen.
  7848.  
  7849.  
  7850.  
  7851.  
  7852.           ___________________________________________________________________
  7853.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  130
  7854.  
  7855.                                                CHAPTER 6 / OPTIONS AND TUNING
  7856.           ___________________________________________________________________
  7857.  
  7858.  
  7859.  
  7860.                    HistWinTop = nn (1):  Sets the vertical position of the
  7861.                    top of the command line history window.  Legal values
  7862.                    range from 0 (the top of the screen) to the number of
  7863.                    rows on your screen minus 5.  Any value which would cause
  7864.                    the bottom of a minimum-height window to be off the
  7865.                    screen will be adjusted so that the entire window remains
  7866.                    on the screen.
  7867.  
  7868.                    HistWinWidth = nn (36):  Sets the width of the command
  7869.                    line history window in characters, including the border.
  7870.                    Legal values range from 10 to the width of your screen;
  7871.                    any value which would cause the right side of the window
  7872.                    to be off the screen will be adjusted so that the entire
  7873.                    window remains on the screen.
  7874.  
  7875.                    LineInput = Yes | NO:  This directive controls how 4DOS
  7876.                    gets its input from the command line.  "Yes" forces 4DOS
  7877.                    to use line input via the DOS service INT 21H 0AH "Get
  7878.                    Line" which is the way that COMMAND.COM gets input.  This
  7879.                    will disable command-line editing, history recall, and
  7880.                    filename completion, and is normally used only for rare
  7881.                    memory-resident programs (TSRs) which do not work
  7882.                    properly unless the command processor uses line input.
  7883.                    If you have a particular program that requires line
  7884.                    input, you can use SETDOS /L to temporarily change modes.
  7885.                    See APPNOTES.DOC for any specific programs which require
  7886.                    this option.
  7887.  
  7888.                    NoClobber = Yes | NO:  If set to Yes, will prevent
  7889.                    standard output redirection (see page 66) from
  7890.                    overwriting an existing file, and will require that the
  7891.                    output file already exist for append redirection.  Also
  7892.                    see SETDOS /N.
  7893.  
  7894.                    ParameterChar = c.  Sets the character used to specify
  7895.                    all or all remaining command line arguments.  The default
  7896.                    is "&" (as in "%&") for 4DOS and "$" (as in "%$") for
  7897.                    4OS2.  Also see SETDOS /P
  7898.  
  7899.                    ScreenRows = nnnn:  Sets the number of screen rows used
  7900.                    by the video display.  Normally, 4DOS detects the screen
  7901.                    size automatically, but if you have a non-standard
  7902.                    display you may need to set it explicitly.  This value
  7903.                    does not affect screen scrolling, which is controlled by
  7904.                    your video BIOS or ANSI driver.  ScreenRows is used only
  7905.                    by the LIST and SELECT commands, the paged output options
  7906.  
  7907.  
  7908.  
  7909.           ___________________________________________________________________
  7910.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  131
  7911.  
  7912.                                                CHAPTER 6 / OPTIONS AND TUNING
  7913.           ___________________________________________________________________
  7914.  
  7915.  
  7916.                    of other commands (e.g., TYPE /P), and error checking in
  7917.                    the screen output commands.  Also see SETDOS /R.
  7918.  
  7919.                    UpperCase = Yes | NO:  "Yes" specifies that filenames
  7920.                    should be displayed in the traditional upper-case by
  7921.                    internal commands like COPY and DIR.  "No" allows the
  7922.                    normal 4DOS lower-case style.  Also see SETDOS /U.
  7923.  
  7924.  
  7925.               Color Directives
  7926.  
  7927.               These directives control the colors that 4DOS uses for its
  7928.               displays.  Screen border colors can only be set in StdColors.
  7929.               "BORder" color specifications included in other directives
  7930.               will be ignored.
  7931.  
  7932.                    ColorDir = ext1 ext2 ...:colora;ext3 ext4 ... :colorb ...
  7933.                    (none):  Sets the directory colors.  The format is the
  7934.                    same as that used for the COLORDIR environment variable
  7935.                    (see DIR on page 211 or SELECT on page 293).  If you set
  7936.                    the COLORDIR environment variable it will override this
  7937.                    directive.  You may find it useful to use the COLORDIR
  7938.                    variable for experimenting, then to set permanent
  7939.                    directory colors with a ColorDir directive in 4DOS.INI.
  7940.  
  7941.                    HistWinColor = Color:  Sets the default colors for the
  7942.                    command line history window.  If this directive is not
  7943.                    used the colors will be reversed from the current colors
  7944.                    on the screen.
  7945.  
  7946.                    ListColors = Color:  Sets the colors used by the LIST and
  7947.                    SELECT commands.  If this directive is not used, LIST and
  7948.                    SELECT will use the current default colors set by the CLS
  7949.                    or COLOR command or by the StdColors directive, below.
  7950.  
  7951.                    StdColors = Color:  Sets the standard colors to be used
  7952.                    when CLS is used without a color specification, and for
  7953.                    LIST and SELECT if ListColors is not used.  Using this
  7954.                    directive is similar to placing a COLOR command in
  7955.                    AUTOEXEC.BAT.  StdColors takes effect the first time CLS,
  7956.                    LIST, or SELECT is used after the transient portion of
  7957.                    4DOS starts (i.e., when 4START is run).  However it will
  7958.                    not affect the color of error or other messages displayed
  7959.                    during the 4DOS loading and initialization process.  If
  7960.                    ANSI.SYS or a compatible driver is not loaded, the colors
  7961.                    will not be "sticky" -- you may lose them when you run an
  7962.                    application.
  7963.  
  7964.  
  7965.  
  7966.           ___________________________________________________________________
  7967.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  132
  7968.  
  7969.                                                CHAPTER 6 / OPTIONS AND TUNING
  7970.           ___________________________________________________________________
  7971.  
  7972.  
  7973.  
  7974.  
  7975.               Key Mapping Directives
  7976.  
  7977.               The directives in this group allow you to change the keys used
  7978.               for 4DOS command line editing and other internal functions.
  7979.               They take effect only inside 4DOS itself and do not affect
  7980.               other programs (including 4DOS's external help program,
  7981.               4HELP.EXE).
  7982.  
  7983.               The description of each directive below explains the function
  7984.               of the corresponding key.  Using the directive allows you to
  7985.               assign a different or additional key to perform the function
  7986.               described.  For example, to assign function key F3 to invoke
  7987.               the 4DOS HELP facility:
  7988.  
  7989.                    Help = F3
  7990.  
  7991.               Any directive can be used multiple times to assign multiple
  7992.               keys to the same function.  For example:
  7993.  
  7994.                    ListFind = F         ;F does a find in LIST
  7995.                    ListFind = F5        ;F5 also does a find in LIST
  7996.  
  7997.               Use some care when you reassign keystrokes.  If you assign a
  7998.               default key to a different function, it will no longer be
  7999.               available for its original use.  For example, if you assign F1
  8000.               to the AddFile directive (a part of filename completion), the
  8001.               F1 key will no longer invoke 4DOS's HELP facility, so you will
  8002.               probably want to assign a different key to HELP.
  8003.  
  8004.               Some keys are interpreted by your system's BIOS and are not
  8005.               passed on to 4DOS.  For example, Ctrl-S tells the BIOS to
  8006.               pause screen output temporarily, and on some systems Ctrl-P
  8007.               toggles Print Screen mode.  Keys which are interpreted by the
  8008.               BIOS cannot be assigned with key mapping directives, because
  8009.               4DOS never receives these keystrokes and therefore cannot act
  8010.               on them.
  8011.  
  8012.               You may not be able to remap F11 and F12 if your keyboard is
  8013.               not 100% IBM-compatible, or if you have an ANSI driver which
  8014.               does not support these keys.  This limitation is due to DOS
  8015.               and your ANSI driver, and is not inherent in 4DOS.
  8016.  
  8017.               4DOS processes all command line editing key assignments before
  8018.               looking for keystroke aliases.  For example, if you assign
  8019.               Shift-F1 to HELP and also assign Shift-F1 to a key alias, the
  8020.               key alias will be ignored.
  8021.  
  8022.  
  8023.           ___________________________________________________________________
  8024.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  133
  8025.  
  8026.                                                CHAPTER 6 / OPTIONS AND TUNING
  8027.           ___________________________________________________________________
  8028.  
  8029.  
  8030.  
  8031.               Assigning a new keystroke for a function does not deassign the
  8032.               default keystroke for the same function.  If you want to
  8033.               deassign one of the standard 4DOS keys without assigning it to
  8034.               another function, use the NormalKey directive described below
  8035.               or the corresponding directive for keys in the other key
  8036.               groups (NormalEditKey, NormalHWinKey, or NormalListKey).
  8037.  
  8038.               There are three pre-mapped keys:  Tab and Shift-Tab (mapped to
  8039.               NextFile and PrevFile respectively) and Ctrl-Bksp (mapped to
  8040.               DelWordRight).  If you need to clear out these assignments so
  8041.               you can assign Tab, Shift-Tab, or Ctrl-Bksp to a keystroke
  8042.               alias, use the ClearKeyMap directive, described in Advanced
  8043.               Directives below.
  8044.  
  8045.               General Input Keys
  8046.  
  8047.                    This first set of Key Mapping Directives applies to all
  8048.                    input.  These directives are effective whenever 4DOS
  8049.                    requests input from the keyboard, including command line
  8050.                    editing and the DESCRIBE, ESET, INPUT, LIST, and SELECT
  8051.                    commands.  (Scrolling through the command history list is
  8052.                    controlled by NextHist and PrevHist (see page 136), not
  8053.                    by the Up and Down directives below.)  See page 55 for
  8054.                    more information about command line editing.
  8055.  
  8056.                    Backspace = Key  (Bksp):  Deletes the character to the
  8057.                    left of the cursor.
  8058.  
  8059.                    BeginLine = Key  (Home):  Moves the cursor to the
  8060.                    beginning of the line.
  8061.  
  8062.                    Del = Key  (Del):  Deletes the character at the cursor.
  8063.  
  8064.                    DelToBeginning = Key (Ctrl-Home):  Deletes from the
  8065.                    cursor to the start of the line.
  8066.  
  8067.                    DelToEnd = Key (Ctrl-End):  Deletes from the cursor to
  8068.                    the end of the line.
  8069.  
  8070.                    DelWordLeft = Key  (Ctrl-L):  Deletes the word to the
  8071.                    left of the cursor.
  8072.  
  8073.                    DelWordRight = Key  (Ctrl-R, Ctrl-Bksp):  Deletes the
  8074.                    word to the right of the cursor.  See ClearKeyMap in
  8075.                    Advanced Directives below if you need to remove the
  8076.                    mapping of Ctrl-Bksp to this function.
  8077.  
  8078.  
  8079.  
  8080.           ___________________________________________________________________
  8081.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  134
  8082.  
  8083.                                                CHAPTER 6 / OPTIONS AND TUNING
  8084.           ___________________________________________________________________
  8085.  
  8086.  
  8087.  
  8088.                    Down = Key  (Down):  Scrolls the display down one line in
  8089.                    LIST; moves the cursor down one line in SELECT and in the
  8090.                    command history window.
  8091.  
  8092.                    EndLine = Key  (End):  Moves the cursor to the end of the
  8093.                    line.
  8094.  
  8095.                    EraseLine = Key  (Esc):  Deletes the entire line.
  8096.  
  8097.                    ExecLine = Key (Enter):  Executes or accepts a line.
  8098.  
  8099.                    Ins = Key (Ins):  Toggles insert / overstrike mode during
  8100.                    line editing.
  8101.  
  8102.                    Left = Key  (Left):  Moves the cursor left one character;
  8103.                    moves the display left 8 columns in LIST.
  8104.  
  8105.                    NormalKey = Key:  Deassigns a general input key in order
  8106.                    to disable the usual meaning of the key within 4DOS and /
  8107.                    or make it available for keystroke aliases.  This will
  8108.                    cause 4DOS to treat the keystroke as a "normal" key with
  8109.                    no special function.  For example:
  8110.  
  8111.                         NormalKey = Ctrl-End
  8112.  
  8113.                    will disable Ctrl-End, which is the standard "delete to
  8114.                    beginning of line" key.  Ctrl-End could then be assigned
  8115.                    to a keystroke alias.  Another key could be assigned the
  8116.                    "delete to end of line" function with the DelToEnd
  8117.                    directive (above).
  8118.  
  8119.                    Right = Key  (Right):  Moves the cursor right one
  8120.                    character;  scrolls the display right 8 columns in LIST.
  8121.  
  8122.                    Up = Key  (Up):  Scrolls the display up one line in LIST;
  8123.                    moves the cursor up one line in SELECT and in the command
  8124.                    history window.
  8125.  
  8126.                    WordLeft = Key  (Ctrl-Left):  Moves the cursor left one
  8127.                    word;  scrolls the display left 40 columns in LIST.
  8128.  
  8129.                    WordRight = Key  (Ctrl-Right):  Moves the cursor right
  8130.                    one word;  scrolls the display right 40 columns in LIST.
  8131.  
  8132.  
  8133.  
  8134.  
  8135.  
  8136.  
  8137.           ___________________________________________________________________
  8138.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  135
  8139.  
  8140.                                                CHAPTER 6 / OPTIONS AND TUNING
  8141.           ___________________________________________________________________
  8142.  
  8143.  
  8144.  
  8145.  
  8146.               Command Line Editing Keys
  8147.  
  8148.                    The following directives apply only to command line
  8149.                    editing.  They are only effective at the 4DOS prompt.
  8150.  
  8151.                    AddFile = Key  (F10):  Keeps the current filename
  8152.                    completion entry and inserts the next matching name.
  8153.  
  8154.                    CommandEscape = Key  (Alt-255):  Allows direct entry of a
  8155.                    keystroke that would normally be interpreted as an editor
  8156.                    command.
  8157.  
  8158.                    DelHistory = Key  (Ctrl-D):  Deletes the displayed
  8159.                    history list entry and displays the previous entry.
  8160.  
  8161.                    EndHistory = Key  (Ctrl-E):  Displays the last entry in
  8162.                    the history list.
  8163.  
  8164.                    Help = Key  (F1):  Invokes the 4DOS HELP facility.
  8165.  
  8166.                    NextFile = Key  (F9, Tab):  Gets the next matching
  8167.                    filename.  See ClearKeyMap in Advanced Directives below
  8168.                    if you need to remove the mapping of Tab to this
  8169.                    function.
  8170.  
  8171.                    NextHistory = Key  (Down):  Recalls the next command from
  8172.                    the command history.
  8173.  
  8174.                    NormalEditKey = Key:  Deassigns a command line editing
  8175.                    key in order to disable the usual meaning of the key
  8176.                    while editing a command line and / or make it available
  8177.                    for keystroke aliases.  This will cause 4DOS to treat the
  8178.                    keystroke as a "normal" key with no special function.
  8179.                    For an example see the NormalKey directive on page 135.
  8180.  
  8181.                    PrevFile = Key  (F8, Shift-Tab):  Gets the previous
  8182.                    matching filename.  See ClearKeyMap in Advanced
  8183.                    Directives below if you need to remove the mapping of
  8184.                    Shift-Tab to this function.
  8185.  
  8186.                    PrevHistory = Key  (Up):  Recalls the previous command
  8187.                    from the command history.
  8188.  
  8189.                    SaveHistory = Key  (Ctrl-K):  Saves the command line in
  8190.                    the history list without executing it.
  8191.  
  8192.  
  8193.  
  8194.           ___________________________________________________________________
  8195.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  136
  8196.  
  8197.                                                CHAPTER 6 / OPTIONS AND TUNING
  8198.           ___________________________________________________________________
  8199.  
  8200.  
  8201.  
  8202.  
  8203.               History Window Keys
  8204.  
  8205.                    HistWinBegin = Key (Ctrl-PgUp):  Moves to the first line
  8206.                    of the history when in the history window.
  8207.  
  8208.                    HistWinDel = Key (Ctrl-D):  Deletes a line from within
  8209.                    the history window.
  8210.  
  8211.                    HistWinEdit = Key (Ctrl-Enter):  Moves a line from the
  8212.                    history window to the prompt for editing.
  8213.  
  8214.                    HistWinEnd = Key (Ctrl-PgDn):  Moves to the last line of
  8215.                    the history when in the history window.
  8216.  
  8217.                    HistWinExec = Key (Enter):  Executes the selected line in
  8218.                    the history window.
  8219.  
  8220.                    HistWinOpen = Key (PgUp):  Brings up the history window
  8221.                    while at the command line.
  8222.  
  8223.                    NormalHWinKey = Key:  Deassigns a history window key in
  8224.                    order to disable the usual meaning of the key within the
  8225.                    history window.  This will cause 4DOS to treat the
  8226.                    keystroke as a "normal" key with no special function.
  8227.                    For an example see the NormalKey directive on page 135.
  8228.  
  8229.  
  8230.               LIST Keys
  8231.  
  8232.                    The keys in the last group of Key Mapping Directives are
  8233.                    effective only inside the LIST command.
  8234.  
  8235.                    ListFind = Key  (F):  Prompts and searches for a string.
  8236.  
  8237.                    ListHighBit = Key (H):  Toggles LIST's "strip high bit"
  8238.                    option, which can aid in displaying files from certain
  8239.                    word processors.
  8240.  
  8241.                    ListNext = Key  (N):  Finds the next matching string.
  8242.  
  8243.                    ListPrint = Key  (P):  Prints the file on LPT1.
  8244.  
  8245.                    ListWrap = Key (W):  Toggles LIST's wrap option on and
  8246.                    off.  The wrap option wraps text at the right margin.
  8247.  
  8248.  
  8249.  
  8250.  
  8251.           ___________________________________________________________________
  8252.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  137
  8253.  
  8254.                                                CHAPTER 6 / OPTIONS AND TUNING
  8255.           ___________________________________________________________________
  8256.  
  8257.  
  8258.  
  8259.                    NormalListKey = Key (none):  Deassigns a LIST key in
  8260.                    order to disable the usual meaning of the key within
  8261.                    LIST.  This will cause 4DOS to treat the keystroke as a
  8262.                    "normal" key with no special function.  For an example
  8263.                    see the NormalKey directive on page 135.
  8264.  
  8265.  
  8266.               Advanced Directives
  8267.  
  8268.               These directives are generally used for unusual circumstances,
  8269.               or for diagnosing problems.  Most often they are not needed in
  8270.               normal use.
  8271.  
  8272.                    ChangeTitle = YES | No:  Determines whether 4DOS changes
  8273.                    the OS/2 session title when running an external program
  8274.                    from an OS/2 2.0 DOS session.
  8275.  
  8276.                    ClearKeyMap:  Clears all current key mappings.
  8277.                    ClearKeyMap is a special directive which has no value or
  8278.                    "=" after it.  Use ClearKeyMap to make one of the keys in
  8279.                    4DOS's default map (Tab, Shift-Tab, or Ctrl-Bksp)
  8280.                    available for a keystroke alias; or in the [Secondary]
  8281.                    section to clear key mappings inherited from the primary
  8282.                    shell.  ClearKeyMap should appear before any other key
  8283.                    mapping directives.  If you only need to clear some of
  8284.                    the default mappings, use ClearKeyMap, then recreate the
  8285.                    mappings you want to retain (e.g. with "Tab=NextFile",
  8286.                    etc.).
  8287.  
  8288.                    CopyEA = YES | No:  Determines whether the 4DOS COPY and
  8289.                    MOVE commands attempt to copy extended attributes when
  8290.                    running in an OS/2 1.x or 2.0 DOS session.
  8291.  
  8292.                    CritFail = Yes | NO:  This is the same as /F on the SHELL
  8293.                    = line in CONFIG.SYS.  It intercepts all DOS critical
  8294.                    errors and returns a Fail to each.  We do not recommend
  8295.                    this on a normal system, because you will not have a
  8296.                    chance to react to a critical error and correct the
  8297.                    problem that caused it.  It is intended for use on
  8298.                    bulletin boards or other systems where unattended
  8299.                    operation is required without user prompts.
  8300.  
  8301.                    DiskReset = Yes | NO:  Enables or disables disk resets
  8302.                    after COPY, DEL/ERASE, DESCRIBE, MOVE, and REN/RENAME,
  8303.                    and before DIR.  Set to Yes if you have problems with
  8304.                    disk change detection on non-standard or cached floppy
  8305.                    disk drives, or with network software which doesn't
  8306.  
  8307.  
  8308.           ___________________________________________________________________
  8309.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  138
  8310.  
  8311.                                                CHAPTER 6 / OPTIONS AND TUNING
  8312.           ___________________________________________________________________
  8313.  
  8314.  
  8315.                    always properly flush data to the disk.  Such problems
  8316.                    are very, rare so normally No is the best choice.
  8317.                    Setting DiskReset to Yes may reduce the performance of
  8318.                    DIR, COPY, MOVE, and RENAME when using a "staged-write"
  8319.                    disk cache such as Microsoft SmartDrive 4.0.
  8320.  
  8321.                    DRSets = YES | No.  When running under DR-DOS, 4DOS will
  8322.                    normally retrieve environment variables created by any
  8323.                    SET commands in the DR-DOS CONFIG.SYS file and place them
  8324.                    in the 4DOS master environment.  Set DRSets to No to
  8325.                    disable this feature.
  8326.  
  8327.                    DVCleanup = YES | No.  No disables 4DOS's DESQview close
  8328.                    window cleanup code and thereby reenables the Quit choice
  8329.                    on the DESQview menu when at a 4DOS prompt.  This will
  8330.                    prevent 4DOS from cleaning up its resources (releasing
  8331.                    the shell number and deleting any disk swap file) when
  8332.                    you Close a 4DOS window from the DESQview menu, rather
  8333.                    than with the EXIT command.
  8334.  
  8335.                    FineSwap = Yes | NO:  "Yes" enables "fine-grained"
  8336.                    checksums during disk swapping.  This should be used only
  8337.                    to diagnose unusual swapping problems.
  8338.  
  8339.                    FullINT2E = Yes | NO:  Enables full support for the
  8340.                    COMMAND.COM "back door" (interrupt 2E) which a few
  8341.                    programs use to execute commands.  Effective only in a
  8342.                    primary shell loaded via the SHELL= command in
  8343.                    CONFIG.SYS.  See Appendix C on page 344 below for details
  8344.                    on using INT 2E.  Also, see APPNOTES.DOC for information
  8345.                    on any programs known to require this option.  If this
  8346.                    directive is not used or is set to NO, INT 2E will return
  8347.                    immediately to the calling program without taking any
  8348.                    action.  Setting FullINT2E to YES adds about 100 bytes to
  8349.                    the resident size of the primary shell.
  8350.  
  8351.                    Inherit = YES | No:  Aliases and the history list are
  8352.                    normally passed to secondary shells automatically.  "No"
  8353.                    disables this feature.
  8354.  
  8355.                    MessageServer = YES | No:  For compatibility with
  8356.                    COMMAND.COM in MS-DOS 4.x and 5.x, 4DOS includes a
  8357.                    "message server" that retrieves error message text for
  8358.                    DOS external commands like DISKCOPY and FORMAT.  The
  8359.                    message server increases the size of the resident portion
  8360.                    of 4DOS by about 200 bytes.  "No" disables the message
  8361.                    server and saves this space, but will cause more cryptic
  8362.                    error messages such as "Parse error 3" or "Extended error
  8363.  
  8364.  
  8365.           ___________________________________________________________________
  8366.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  139
  8367.  
  8368.                                                CHAPTER 6 / OPTIONS AND TUNING
  8369.           ___________________________________________________________________
  8370.  
  8371.  
  8372.                    7" from some DOS external commands.  The message server
  8373.                    is automatically disabled by 4DOS except in the primary
  8374.                    4DOS shell loaded from CONFIG.SYS when running under DOS
  8375.                    4.x or 5.x.
  8376.  
  8377.                    NetwareNames = Yes | NO.  Set to Yes to include strings
  8378.                    in the resident portion of 4DOS which Novell Netware
  8379.                    searches for when it loads.  NetwareNames should be Yes
  8380.                    for Netware systems to avoid problems with destroyed
  8381.                    environment variables during LOGIN.  If NetwareNames is
  8382.                    set to Yes and you boot from a Netware drive (a rare
  8383.                    situation), the TEMP4DOS or TEMP variables must be SET
  8384.                    explicitly to the appropriate drive and directory for
  8385.                    each user to avoid conflicts with pipe files (in all
  8386.                    other circumstances, 4DOS and Netware will automatically
  8387.                    set the proper drive and directory for pipe files).
  8388.  
  8389.                    NextINIFile = File.  Full path and name must be
  8390.                    specified.  All subsequent shells will read the specified
  8391.                    INI file, and ignore any [Secondary] section in the
  8392.                    original 4DOS.INI.  Intended to allow diskless or floppy-
  8393.                    only workstation users to shift 4DOS.INI to a network
  8394.                    drive for secondary shells, and avoid all access to the
  8395.                    original boot drive.
  8396.  
  8397.                    Reduce = YES | No:  Set to "No" to disable the smaller
  8398.                    swap size used by 4DOS secondary shells.  For diagnosing
  8399.                    unusual swapping problems only.
  8400.  
  8401.                    ReserveTPA = YES | No:  Set to "No" to prevent 4DOS from
  8402.                    reserving memory for its transient portion while at the
  8403.                    command prompt.  For diagnosing unusual TSR or swapping
  8404.                    problems only.  ReserveTPA is forced to YES regardless of
  8405.                    any INI file setting if you are running under Windows 3
  8406.                    in real or standard mode.  This is necessary to avoid
  8407.                    undesirable interactions between 4DOS and Windows.
  8408.  
  8409.                    StackSize= nnnn (4096):  Set the 4DOS internal stack
  8410.                    size.  The allowable range of values is 4096 to 8192.
  8411.                    You may need to increase the stack size if you are using
  8412.                    extremely complex combinations of batch files and nested
  8413.                    "prefix" commands like EXCEPT, FOR, GLOBAL, IF, and
  8414.                    SELECT on the same command line, and you receive a "4DOS
  8415.                    internal stack overflow" error.  For virtually all users
  8416.                    the default stack size will be sufficient.  Increasing
  8417.                    this value also increases the size of 4DOS's transient
  8418.                    portion and the size of the 4DOS swap area.
  8419.  
  8420.  
  8421.  
  8422.           ___________________________________________________________________
  8423.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  140
  8424.  
  8425.                                                CHAPTER 6 / OPTIONS AND TUNING
  8426.           ___________________________________________________________________
  8427.  
  8428.  
  8429.  
  8430.                    SwapReopen = Yes | NO:  Set to "Yes" to enable reopening
  8431.                    of the 4DOS swap file if it is closed by another program.
  8432.                    This is required when swapping 4DOS to Novell Netware
  8433.                    drives or when using other applications which close
  8434.                    4DOS's swap file.  In all other circumstances, it is only
  8435.                    useful for diagnostic purposes.  Setting SwapReopen to
  8436.                    "Yes" also disables the reduced swapping size normally
  8437.                    used in 4DOS secondary shells.
  8438.  
  8439.                    UniqueSwapName = Yes | No.  Set to Yes to change the disk
  8440.                    swap file name from 4DOSSWAP.nnn to a unique name
  8441.                    generated by 4DOS, with an extension of "4SW" (eg
  8442.                    a1gd6nnw.4sw).  This prevents conflicts between swap
  8443.                    files in different shells; it is only necessary when you
  8444.                    are using disk swapping with a COMMAND.COM primary shell
  8445.                    or in an OS/2 2.0 DOS session.  The default is Yes in
  8446.                    OS/2 2.0 DOS sessions and No elsewhere.  UniqueSwapName
  8447.                    only works in DOS 3.0 and above and applies only to disk
  8448.                    swapping.
  8449.  
  8450.  
  8451.               Examples
  8452.  
  8453.               The following examples will give you an idea of the types of
  8454.               things that can be done with the 4DOS.INI file.  The comments
  8455.               on each directive explain what it does.
  8456.  
  8457.               First, a very simple example that just sets up swapping and
  8458.               environment size, leaving everything else at its default
  8459.               value:
  8460.  
  8461.                    Swapping = ems, c:\
  8462.                                                   ;try EMS, then C: root
  8463.                    Environment = 1024             ;set environment size
  8464.  
  8465.               Here's something a little fancier that changes a number of the
  8466.               default settings:
  8467.  
  8468.                    Swapping = xms, h:\, c:\
  8469.                                                   ;try XMS, then RAM disk,
  8470.                                                   ;  then C: root
  8471.                    Environment = 1792             ;set env size
  8472.                    Alias = 6144                   ;set alias size
  8473.                    History = 1024                 ;set history size
  8474.                    UmbEnv=Y                       ;master environment in UMB
  8475.                    BatchEcho = No                 ;default is ECHO OFF
  8476.                    EditMode = Insert              ;editor in insert mode
  8477.  
  8478.  
  8479.           ___________________________________________________________________
  8480.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  141
  8481.  
  8482.                                                CHAPTER 6 / OPTIONS AND TUNING
  8483.           ___________________________________________________________________
  8484.  
  8485.  
  8486.                    CursorO = 100                  ;overstrike cursor 100%
  8487.                    CursorI = 10                   ;insert cursor 10%
  8488.  
  8489.               The final example is similar to the second, but includes key
  8490.               reassignments and a [Secondary] section to vary a couple of
  8491.               settings in secondary shells:
  8492.  
  8493.                    ; ALL SHELLS
  8494.                    PauseOnError = No              ;don't stop on an error
  8495.                    Swapping = xms, c:\
  8496.                                                   ;try XMS, then C: root
  8497.                    Environment = 1792             ;set env size
  8498.                    Alias = 6144                   ;set alias size
  8499.                    History = 1024                 ;set history size
  8500.                    UmbEnv=Y                       ;master environment in UMB
  8501.                    BatchEcho = No                 ;default is ECHO OFF
  8502.                    EditMode = Insert              ;editor in insert mode
  8503.                    CursorO = 100                  ;overstrike cursor 100%
  8504.                    ListFind = F5                  ;set LIST find to F5
  8505.                    ListNext = F6                  ;find next is F6
  8506.                    ListPrint = F7                 ;print file is F7
  8507.                    ;     PRIMARY SHELL ONLY
  8508.                    [Primary]                      ;set primaries
  8509.                    CursorI = 10                   ;insert cursor 10%
  8510.                    StdColors = bri whi on blu     ;set primary's colors
  8511.                    ;     SECONDARY SHELL ONLY
  8512.                    [Secondary]                    ;set secondaries
  8513.                    CursorI = 30                   ;insert cursor 30%
  8514.                    StdColors = bri whi on cya     ;set secondary's colors
  8515.  
  8516.  
  8517.  
  8518.  
  8519.  
  8520.  
  8521.  
  8522.  
  8523.  
  8524.  
  8525.  
  8526.  
  8527.  
  8528.  
  8529.  
  8530.  
  8531.  
  8532.  
  8533.  
  8534.  
  8535.  
  8536.           ___________________________________________________________________
  8537.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  142
  8538.  
  8539.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8540.           ___________________________________________________________________
  8541.  
  8542.  
  8543.  
  8544.           CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8545.  
  8546.  
  8547.           This section of the manual explains how to get the most from 4DOS
  8548.           with your particular system.  A few general techniques and concepts
  8549.           are explained here, but if you have questions about how to make
  8550.           4DOS run most efficiently with a particular hardware setup or a
  8551.           specific application, you should also see the file called
  8552.           APPNOTES.DOC which comes with 4DOS.
  8553.  
  8554.           If you have questions about some of the terms and concepts here,
  8555.           see Chapter 4 / General Concepts on page 41, the Glossary on page
  8556.           351, and the Index.
  8557.  
  8558.           This section begins with a discussion of hardware considerations
  8559.           and includes some tips for installing 4DOS most effectively to run
  8560.           with several types of software, as well as certain popular
  8561.           programs.  It concludes with some techniques for resolving
  8562.           unintended interactions between programs, even if those
  8563.           interactions do not include 4DOS itself.
  8564.  
  8565.  
  8566.           Hardware
  8567.  
  8568.  
  8569.               The CPU
  8570.  
  8571.               The CPU or "Central Processing Unit" is the chip which
  8572.               performs or directs all of the work done by your computer.
  8573.               All PC CPU chips are part of or compatible with Intel's
  8574.               "80x86" family.  These include the 8088, 8086, 80188, 80186,
  8575.               80286, 386, 486, NEC V20, and NEC V30, plus "SX" versions and
  8576.               other variations of some of those chips.  4DOS is compatible
  8577.               with and will run equally well on all of these chips.
  8578.  
  8579.               Some systems have a numeric coprocessor as a companion to the
  8580.               CPU.  The numeric coprocessor performs many arithmetic
  8581.               calculations faster than the CPU.  4DOS does not use or access
  8582.               the numeric coprocessor in any way.
  8583.  
  8584.               You can determine which CPU chip your system has by using
  8585.               4DOS's _CPU internal variable:
  8586.  
  8587.                    c:\> echo %_cpu
  8588.  
  8589.               Similarly, you can find out if you have a numeric coprocessor
  8590.               with _NDP:
  8591.  
  8592.  
  8593.           ___________________________________________________________________
  8594.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  143
  8595.  
  8596.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8597.           ___________________________________________________________________
  8598.  
  8599.  
  8600.  
  8601.                    c:\> echo %_ndp
  8602.  
  8603.               See page 83 for details about _CPU and _NDP.
  8604.  
  8605.  
  8606.               Memory
  8607.  
  8608.               4DOS does its best to detect and properly access all types of
  8609.               memory that your computer can have:  Base memory, Expanded
  8610.               (EMS) Memory, Extended (XMS) Memory, and Upper Memory Blocks
  8611.               (UMBs).  4DOS always uses standard, documented methods to use
  8612.               the memory that you have installed.
  8613.  
  8614.               4DOS uses base memory (the area from 0 to 640K on most
  8615.               machines, which is sometimes called "low memory" or "DOS
  8616.               memory") for its resident portion and the master environment,
  8617.               and to hold its transient portion while your system is at the
  8618.               command prompt or executing a 4DOS command or batch file.
  8619.               4DOS may use EMS memory or an XMS Extended Memory Block (EMB)
  8620.               to swap its transient portion, according to the Swapping
  8621.               directive in your 4DOS.INI file (see page 126).
  8622.  
  8623.               4DOS uses UMBs for several purposes:
  8624.  
  8625.                    *  to move the 4DOS resident portion out of base memory,
  8626.                       if you specify "UMBLoad = Yes" in your 4DOS.INI file.
  8627.  
  8628.                    *  to move the master environment out of base memory, if
  8629.                       you specify "UMBEnvironment = Yes" in your 4DOS.INI
  8630.                       file.
  8631.  
  8632.                    *  to load memory-resident programs (TSRs) "high" using
  8633.                       the LOADHIGH or LH command under MS-DOS 5.0.
  8634.  
  8635.               To load 4DOS or the master environment into a UMB, you must be
  8636.               using a memory manager or XMS driver which provides both the
  8637.               ability to remap memory into the area between 640K and 1MB (to
  8638.               create the UMBs) and XMS or DOS 5.0 UMB support (to manage the
  8639.               UMBs).  These are generally the same requirements which must
  8640.               be met to load TSRs "high."
  8641.  
  8642.               To give 4DOS access to UMBs, you need hardware and software
  8643.               combinations like the following:
  8644.  
  8645.  
  8646.  
  8647.  
  8648.  
  8649.  
  8650.           ___________________________________________________________________
  8651.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  144
  8652.  
  8653.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8654.           ___________________________________________________________________
  8655.  
  8656.  
  8657.  
  8658.               386 and 486 systems (including 386SX computers):
  8659.  
  8660.                    Hardware:  Sufficient installed RAM.
  8661.  
  8662.                    Software:  Qualitas' 386MAX or Blue Max, Quarterdeck's
  8663.                    QEMM 5.0 or later, DOS 5.0's EMM386.SYS, or a similar 386
  8664.                    memory manager.  HIMEM.SYS alone is not sufficient.
  8665.  
  8666.               80286 systems:
  8667.  
  8668.                    Hardware:  Chips and Technologies NEAT chip set, or an
  8669.                    EMS 4.0 or EEMS memory board, plus sufficient installed
  8670.                    RAM.
  8671.  
  8672.                    Software:  Qualitas' MOVE-EM 1.02 or later with
  8673.                    Microsoft's HIMEM.SYS, or Quarterdeck's QRAM and QEXT.
  8674.  
  8675.               Other memory-management software may also work.  The lists
  8676.               above are examples only.  On the 386 systems here at JP
  8677.               Software, we use 386MAX almost exclusively, but we also have
  8678.               had good results with QEMM.  Look for specific information
  8679.               about your memory management program in APPNOTES.DOC.
  8680.  
  8681.               If you want to use the 4DOS LOADHIGH command as well as put
  8682.               4DOS and the master environment in high memory, you must also
  8683.               be running MS-DOS 5.0 or above.
  8684.  
  8685.               4DOS never accesses extended memory directly.  It always uses
  8686.               an XMS driver like HIMEM.SYS, EMM386.SYS, 386MAX, QEXT, or
  8687.               QEMM.  4DOS can also access any RAM disk you create in
  8688.               extended memory by using a program like VDISK.SYS or
  8689.               RAMDRIVE.SYS.  4DOS does not use the XMS "High Memory Area"
  8690.               (HMA), a 64K byte area just above 1 MB on 80286, 386, and 486
  8691.               systems.
  8692.  
  8693.               If you want to know whether 4DOS sees your system's memory
  8694.               accurately, check the output of the MEMORY command.  It should
  8695.               correspond to your computer's memory configuration.
  8696.  
  8697.               The MEMORY command's output depends to some extent on your
  8698.               memory manager.  If you are using Quarterdeck's QEMM, the
  8699.               report may not be the same as you expect.  Because QEMM turns
  8700.               your extended memory into either XMS or EMS memory as
  8701.               required, the same memory is shown both ways in the MEMORY
  8702.               report.  If 1 MB of extended memory managed by QEMM is
  8703.               available, MEMORY will report 1 MB of free XMS memory and 1 MB
  8704.  
  8705.  
  8706.  
  8707.           ___________________________________________________________________
  8708.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  145
  8709.  
  8710.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8711.           ___________________________________________________________________
  8712.  
  8713.  
  8714.               of free EMS memory as well, even though it is all the same
  8715.               memory.  This is not a bug but a result of QEMM's flexibility.
  8716.  
  8717.               Memory-related problems with 4DOS are usually due to programs
  8718.               which overwrite the extended memory block (EMB) that 4DOS uses
  8719.               for swapping its transient portion.  When you exit from such a
  8720.               program, your system will hang, because 4DOS tried to swap
  8721.               itself back into base memory but its code and data in XMS have
  8722.               been destroyed by the program.  The same problem can occur
  8723.               with EMS swapping but is less common because EMS memory is
  8724.               generally better defended against wayward programs.  You can
  8725.               diagnose this kind of problem easily by changing to disk
  8726.               swapping with the 4DOS.INI Swapping directive, and rebooting.
  8727.               If the problem goes away with disk swapping, then the program
  8728.               in question is probably destroying 4DOS's swap area in XMS or
  8729.               EMS memory.
  8730.  
  8731.               4DOS EMS swapping sometimes has difficulty with EMS drivers
  8732.               which do not fully meet the EMS 3.2 specification (4DOS
  8733.               supports, but does not require, EMS 4.0 drivers).  If you have
  8734.               trouble accessing EMS for swapping, check APPNOTES.DOC to see
  8735.               if there are any known problems with your EMS board or the
  8736.               associated driver software.
  8737.  
  8738.  
  8739.               Video
  8740.  
  8741.               4DOS is compatible with most display adapters and monitors.
  8742.               Although 4DOS can normally detect your video parameters
  8743.               automatically, you may have to configure it to use the system
  8744.               most efficiently.
  8745.  
  8746.               4DOS uses two methods of displaying text on the screen:
  8747.  
  8748.                    *  4DOS calls DOS to write the text of prompts and normal
  8749.                       messages.  If you use an ANSI driver, DOS will transmit
  8750.                       the calls to it.  Otherwise, DOS will use your BIOS to
  8751.                       display text on the screen.  DOS text display calls
  8752.                       will work on all DOS systems, regardless of video type.
  8753.  
  8754.                    *  The DRAWBOX, DRAWHLINE, DRAWVLINE, LIST, SELECT,
  8755.                       SCRPUT, and VSCRPUT commands bypass DOS, the BIOS, and
  8756.                       any ANSI driver.  They write directly to video memory.
  8757.                       These commands will only work on systems with 100% IBM-
  8758.                       compatible video systems.  On other computers, results
  8759.                       will be unpredictable at best.  If you have such a
  8760.                       system you probably know it already, because most
  8761.                       application programs have similar problems.
  8762.  
  8763.  
  8764.           ___________________________________________________________________
  8765.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  146
  8766.  
  8767.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8768.           ___________________________________________________________________
  8769.  
  8770.  
  8771.  
  8772.               EGA and VGA systems can display text in standard 25-line mode,
  8773.               plus modes with 43, 50, or more lines.  4DOS normally detects
  8774.               the number of lines automatically.  If it doesn't, you can use
  8775.               the 4DOS.INI ScreenRows directive or the SETDOS /R command to
  8776.               set the 4DOS screen length.    4DOS uses ScreenRows or SETDOS
  8777.               /R to set the display length that it uses for the LIST and
  8778.               SELECT command, as well as commands that have a "pause" option
  8779.               (TYPE /P, DIR /P, etc.).
  8780.  
  8781.               4DOS never attempts to manipulate your video hardware in order
  8782.               to set the number of rows actually displayed on the screen
  8783.               (the "video mode");  to do so, you must use the software that
  8784.               came with your video board or other software tailored to your
  8785.               system.
  8786.  
  8787.               4DOS does not handle display scrolling at the command prompt.
  8788.               If you put the screen in 43-line or 50-line mode and find that
  8789.               it still scrolls at the 25th line, your ANSI driver is
  8790.               probably not properly supporting your extended screen length.
  8791.               This is not a bug in 4DOS.
  8792.  
  8793.               The video cursor shape that 4DOS uses is defined as a
  8794.               percentage of a character cell height.  You can set the height
  8795.               independently for insert and overstrike mode with the
  8796.               CursorIns and CursorOver directives in 4DOS.INI or with the
  8797.               SETDOS /S command.  If you don't use either, 4DOS sets the
  8798.               height to 10% of the character cell height for overstrike mode
  8799.               and 100% (a block cursor) for insert mode.
  8800.  
  8801.               If you have trouble with the cursor, use SETDOS /S to find the
  8802.               values that work for your system.  Some video boards may not
  8803.               give a "smooth" response to varying SETDOS /S values.  For
  8804.               example, a value of 20% may generate a very small cursor while
  8805.               a value of 30% may generate a half-height cursor.  4DOS can't
  8806.               do anything about this behavior, so you will have to
  8807.               experiment to find the cursor values that you want to use.
  8808.  
  8809.               If the cursor disappears and you can't fix it with SETDOS /S,
  8810.               you probably have a screen color problem.  The cursor is shown
  8811.               in the color of the underlying character cell.  If that cell
  8812.               has (for example) the color attribute of black on black, the
  8813.               cursor will be invisible.  If you are using an ANSI driver,
  8814.               you can fix this problem easily by clearing the screen to a
  8815.               known color with the CLS command.  If the cursor still doesn't
  8816.               reappear, you will have to determine what is setting your
  8817.               screen attributes to an invisible color.  For example, you
  8818.               might be using an ANSI driver that assumes a 25-line video
  8819.  
  8820.  
  8821.           ___________________________________________________________________
  8822.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  147
  8823.  
  8824.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8825.           ___________________________________________________________________
  8826.  
  8827.  
  8828.               mode on an EGA/VGA system running in 43-line or 50-line mode.
  8829.               This can cause the driver to set portions of the screen to an
  8830.               invisible color when the screen is cleared.
  8831.  
  8832.               If you are using an EGA or VGA adapter, we encourage you to
  8833.               try UltraVision from Personics Corp.  It gives you excellent
  8834.               control over your video system, includes a wide variety of
  8835.               text-mode screen fonts, has its own ANSI driver, and works
  8836.               superbly with 4DOS.  We use it and wouldn't be without it.  A
  8837.               special version for laptop and notebook computers dramatically
  8838.               improves the readability of their smaller displays.
  8839.  
  8840.               Most versions of DOS include a copy of ANSI.SYS, a device
  8841.               driver that is normally installed with a DEVICE= line in your
  8842.               CONFIG.SYS file.  There are a number of more powerful and
  8843.               faster versions available as public-domain, shareware, and
  8844.               retail products.  We use PC Magazine's free utility ANSI.COM
  8845.               because it can be enabled, disabled, loaded, and unloaded
  8846.               without rebooting, and because it is small and fast and works
  8847.               well inside windows of multitasking systems.  It is available
  8848.               on most bulletin boards and online systems.  Another excellent
  8849.               choice is ANSI-UV.SYS which is included with UltraVision.
  8850.  
  8851.               4DOS normally detects automatically whether an ANSI driver is
  8852.               installed.  If you have an ANSI driver installed and 4DOS
  8853.               doesn't recognize it, try the command SETDOS /A1 which forces
  8854.               4DOS to use ANSI commands.  Use SETDOS /A2 to tell 4DOS you do
  8855.               not have an ANSI driver installed.  These options can also be
  8856.               set with the ANSI directive in 4DOS.INI.
  8857.  
  8858.  
  8859.               Hard Drives and Floppy Disks
  8860.  
  8861.               4DOS uses your disks for a wide variety of purposes, and many
  8862.               4DOS commands are designed to help you create, move, delete,
  8863.               view, and otherwise manage disk files.  4DOS never tries to
  8864.               manipulate the structure of your hard disk directly.  It never
  8865.               modifies the FAT, root directory, or other system areas of the
  8866.               disk directly, and it doesn't read or write data on your disk
  8867.               itself.  It always calls on DOS to perform these actions, just
  8868.               like most application programs do.  As a result, 4DOS is
  8869.               compatible with all disk sizes, formats, and structures that
  8870.               your DOS version supports.
  8871.  
  8872.               The most common question that we're asked about 4DOS and disks
  8873.               is whether 4DOS will handle a hard disk larger than 32
  8874.               Megabytes.  The answer depends on how your system is
  8875.               configured.  Early versions of DOS do not support hard disks
  8876.  
  8877.  
  8878.           ___________________________________________________________________
  8879.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  148
  8880.  
  8881.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8882.           ___________________________________________________________________
  8883.  
  8884.  
  8885.               over 32 Megabytes unless a disk partitioning driver like
  8886.               SpeedStor, Vfeature Deluxe, or Disk Manager is used.  Later
  8887.               versions of DOS support large hard disks directly, without a
  8888.               partitioning driver.  If your system supports large hard
  8889.               disks, either directly through DOS or with a partitioning
  8890.               driver, 4DOS will support them also.  If your system doesn't
  8891.               support large hard disks, neither will 4DOS.
  8892.  
  8893.               4DOS will generally access your disk very quickly, but the
  8894.               speed depends on what you are trying to do.  If you find that
  8895.               4DOS is slower at performing a particular function than you
  8896.               are used to, you may have asked it to do more than you ask of
  8897.               traditional DOS commands.  In particular, if you use file
  8898.               descriptions, remember that 4DOS has to access the description
  8899.               file as well as the actual files that you are manipulating.
  8900.  
  8901.               Some users notice that the common commands DEL and DIR appear
  8902.               slower with 4DOS under certain circumstances.  With DEL, this
  8903.               slowdown may be because 4DOS uses a newer method of file
  8904.               deletion instead of an older method that is no longer
  8905.               recommended (but commonly used).  The new method is necessary
  8906.               to enable 4DOS to display the names of the files you are
  8907.               deleting, and to support 4DOS's "extended wildcards" (see page
  8908.               71).  You can force 4DOS to use the older method with DEL's /Q
  8909.               option as long as you don't use extended wildcards.
  8910.  
  8911.               For DIR, any perceived speed decrease is because of 4DOS's
  8912.               directory sorting.  4DOS must read all filenames before it can
  8913.               display any of them.  The sort itself is quite fast, but DOS
  8914.               is relatively slow at retrieving the entire list of file names
  8915.               and passing them on to 4DOS.  Once the 4DOS DIR display
  8916.               starts, it should go as fast as or faster than the traditional
  8917.               DIR display.
  8918.  
  8919.               Whenever 4DOS is interrupted by a Ctrl-C or Ctrl-Break, it
  8920.               performs a "disk reset" to clear out DOS disk buffers and
  8921.               reset internal DOS disk parameters.  This helps ensure that
  8922.               modified data has been written to disk even though the
  8923.               operation was interrupted.  A disk reset is also performed
  8924.               before a REBOOT command.  If you have trouble with recognition
  8925.               of floppy disk changes, with CD-ROM drivers, or with network
  8926.               disk access, you can try forcing 4DOS to perform a disk reset
  8927.               after file processing commands, and before a DIR.  To do so
  8928.               use a DiskReset = Yes directive in 4DOS.INI (see page 138).
  8929.               Such problems are very rare and normally DiskReset = Yes is
  8930.               not necessary.
  8931.  
  8932.  
  8933.  
  8934.  
  8935.           ___________________________________________________________________
  8936.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  149
  8937.  
  8938.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8939.           ___________________________________________________________________
  8940.  
  8941.  
  8942.  
  8943.  
  8944.               Laptop and Notebook Computers
  8945.  
  8946.               4DOS makes a great addition to any laptop or notebook
  8947.               computer, but some of these systems have unusual
  8948.               characteristics which you must consider when you install 4DOS
  8949.               or make any change to your CONFIG.SYS file.
  8950.  
  8951.               Many of these computers boot from a floppy drive or a hard
  8952.               disk just like a desktop computer.  On these machines, you can
  8953.               generally install 4DOS just as you would on any other
  8954.               computer.  However, some laptop and notebook computers,
  8955.               including many Tandy laptops, boot from ROM ("Read Only
  8956.               Memory" chips inside the computer).  You need to take some
  8957.               precautions with these machines.
  8958.  
  8959.               First, systems which boot from ROM often can be configured to
  8960.               use either the ROM boot feature or a standard floppy or hard
  8961.               drive boot up.  The following comments only apply when you use
  8962.               the ROM boot feature.
  8963.  
  8964.             ! If your system allows you to boot from ROM but load CONFIG.SYS
  8965.               and AUTOEXEC.BAT from a hard disk or floppy, you need to be
  8966.               cautious.  If you make a mistake in a hard-disk based
  8967.               CONFIG.SYS that keeps your system from booting, there may be
  8968.               no way to tell the ROM boot program to ignore the bad
  8969.               CONFIG.SYS file.  You may have to take drastic measures like
  8970.               opening the case and disconnecting the hard drive to get the
  8971.               system to ignore your mistaken CONFIG.SYS and boot properly.
  8972.  
  8973.               If you have a system that boots from ROM and reads CONFIG.SYS
  8974.               from the hard disk, we strongly recommend that you change the
  8975.               configuration to boot from the hard disk or a floppy before
  8976.               you make any change to your CONFIG.SYS file, whether it is
  8977.               related to 4DOS or not.  This will allow you to boot from a
  8978.               boot-up floppy disk if you make an error in the CONFIG.SYS on
  8979.               your hard drive.  Once you are satisfied that everything is
  8980.               working properly, you can switch back to ROM bootup.
  8981.  
  8982.               The second, and related, issue with systems that boot from ROM
  8983.               is that they may consider the ROM to be a disk drive of sorts.
  8984.               A system with drive C as the hard disk may view the ROM as
  8985.               drive D.  When you boot from ROM, the ROM drive is the current
  8986.               drive, and that is where 4DOS will look for the 4START and
  8987.               AUTOEXEC.BAT files.  But they will be on your hard drive or
  8988.               floppy diskette, and 4DOS won't be able to find them.  (This
  8989.  
  8990.  
  8991.  
  8992.           ___________________________________________________________________
  8993.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  150
  8994.  
  8995.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8996.           ___________________________________________________________________
  8997.  
  8998.  
  8999.               doesn't happen with COMMAND.COM on these systems because the
  9000.               manufacturer has modified it to get around the problem.)
  9001.  
  9002.               If you run into this problem, you can fix it easily with some
  9003.               changes to your CONFIG.SYS and 4DOS.INI files.  First, modify
  9004.               the SHELL= line in CONFIG.SYS so that it tells 4DOS where to
  9005.               find 4DOS.INI.  You can do this by placing the full path to
  9006.               4DOS.INI on the line, like this (see page 112 for more
  9007.               details):
  9008.  
  9009.                    shell=c:\4dos\4dos.com @c:\4dos.ini /p
  9010.  
  9011.               (change the drive and path shown if 4DOS.COM is not in the
  9012.               directory C:\4DOS on your system).  This tells 4DOS to look
  9013.               for 4DOS.INI on drive C, even though the boot drive might be
  9014.               (for example) drive D.  Then add two lines to the 4DOS.INI
  9015.               file (see page 125 for details on these directives):
  9016.  
  9017.                    4StartPath=c:\
  9018.                    AutoExecPath=c:\
  9019.  
  9020.               These tell 4DOS to look for 4START and AUTOEXEC.BAT in the
  9021.               root directory of drive C, even though the boot drive may be
  9022.               different.
  9023.  
  9024.               If you have a system like this, 4DOS may set the COMSPEC to
  9025.               the ROM drive.  You can avoid this by setting the COMSPEC
  9026.               yourself on the SHELL= line in CONFIG.SYS (see page 111).  For
  9027.               example, the SHELL= line above could be modified to read:
  9028.  
  9029.                    shell=c:\4dos\4dos.com c:\4dos @c:\4dos.ini /p
  9030.  
  9031.               The second "C:\4DOS" tells 4DOS to use this directory as the
  9032.               COMSPEC path.
  9033.  
  9034.               Finally, if you have a laptop or notebook computer with a
  9035.               color (CGA, EGA, or VGA) video board and a monochrome screen,
  9036.               you may need to use the HELP /M option,  the HelpOptions
  9037.               directive in 4DOS.INI, or run HELPCFG to adjust the HELP
  9038.               colors.
  9039.  
  9040.  
  9041.               Critical Errors
  9042.  
  9043.               A "critical" error is an error that gives you the "Abort,
  9044.               Retry, Fail" message.  With 4DOS running, this message appears
  9045.               as follows:
  9046.  
  9047.  
  9048.  
  9049.           ___________________________________________________________________
  9050.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  151
  9051.  
  9052.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9053.           ___________________________________________________________________
  9054.  
  9055.  
  9056.  
  9057.                    [Error message]
  9058.                    R(etry), I(gnore), F(ail), or A(bort)?
  9059.  
  9060.               The error message on the first line explains the error that
  9061.               has occurred, and the device on which it occurred.  The second
  9062.               line prompts for your choice of action (the Fail choice will
  9063.               not be displayed under DOS 2).
  9064.  
  9065.               A critical error usually indicates a hardware malfunction.
  9066.               The error may be that the device doesn't exist, there is no
  9067.               disk in the drive, the network has gone down, or a data error
  9068.               occurred.  In most cases you will choose R to retry the
  9069.               operation, or A to abort the operation.
  9070.  
  9071.             ! Choosing I(gnore) can be risky:  it will cause 4DOS to proceed
  9072.               as if the error had not occurred.  This can produce additional
  9073.               errors, and may lead the command which generated the original
  9074.               error to perform its functions improperly.
  9075.  
  9076.               F(ail) will tell 4DOS that the operation it was attempting has
  9077.               failed, which will generally produce another error message.
  9078.               For example, if you attempt to do a directory on drive A with
  9079.               no disk in the drive, and answer F to the resulting critical
  9080.               error, you will get an additional error message, "Invalid
  9081.               drive A".
  9082.  
  9083.               Many programs install their own critical error handlers.  If
  9084.               you get a critical error message within an application and the
  9085.               second line does not read as shown above, the message did not
  9086.               come from 4DOS.  Any problem in handling your response
  9087.               properly is due to the application, not to 4DOS.
  9088.  
  9089.               Choosing A(bort) within an application may abort the entire
  9090.               application and not just the operation being performed.  The
  9091.               specific action depends on which critical error handler is in
  9092.               use (4DOS's or the application's), and how the application's
  9093.               critical error handler (if any) is designed.
  9094.  
  9095.               If you are using 4DOS on a system that must run unattended
  9096.               (for example, a bulletin board), you can use the /F startup
  9097.               option in CONFIG.SYS or the CritFail directive in 4DOS.INI
  9098.               (see pages 111 and 138) to provide an automatic F(ail)
  9099.               response to all critical errors.  However, we do not recommend
  9100.               this on a normal system, because you will not have a chance to
  9101.               react to a critical error and correct the problem that caused
  9102.               it.
  9103.  
  9104.  
  9105.  
  9106.           ___________________________________________________________________
  9107.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  152
  9108.  
  9109.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9110.           ___________________________________________________________________
  9111.  
  9112.  
  9113.  
  9114.  
  9115.           Software
  9116.  
  9117.               You should find that 4DOS is compatible with all your PC
  9118.               software.  We have designed it carefully so that it uses only
  9119.               standard, documented methods to do its job.  It works properly
  9120.               with application software, utilities, networks, multitaskers
  9121.               and task switchers, memory-resident (TSR) programs, and system
  9122.               software like disk caches, memory managers, and device
  9123.               drivers.  We test 4DOS regularly with hundreds of popular
  9124.               software products in order to catch and correct compatibility
  9125.               problems before you encounter them.
  9126.  
  9127.               The following sections discuss using 4DOS with two major kinds
  9128.               of software:  multitasking and task switching programs, and
  9129.               networks.  For specific information about any individual
  9130.               software package, including the latest information about
  9131.               products mentioned here, see the APPNOTES.DOC file distributed
  9132.               with 4DOS.  It contains the latest information we have
  9133.               available when your copy of 4DOS was shipped.
  9134.  
  9135.               If you need to diagnose a problem that isn't covered below or
  9136.               in APPNOTES.DOC, see page 7.
  9137.  
  9138.  
  9139.               4DOS and DOS
  9140.  
  9141.               4DOS is compatible with all versions of MS-DOS and PC-DOS from
  9142.               2.0 through 5.0 and above, and with DR-DOS 3.4, 5.0, and
  9143.               above.  For MS-DOS and PC-DOS users, we recommend the use of
  9144.               DOS 3.1 or above.  Some specific considerations for DR-DOS
  9145.               users are discussed in APPNOTES.DOC.  MS-DOS users using the
  9146.               APPEND command may need to set up some aliases to invoke
  9147.               APPEND; see APPNOTES.DOC for details.
  9148.  
  9149.               If you use the FORMAT /S command from MS-DOS or PC-DOS,
  9150.               version 4.0 or above, FORMAT will copy the file pointed to by
  9151.               the COMSPEC environment variable (see page 116) and name it
  9152.               COMMAND.COM.  In most cases this means that 4DOS.COM will be
  9153.               copied to the floppy disk, but with the name COMMAND.COM.
  9154.               Such a disk should boot properly and start 4DOS, but its
  9155.               contents is sure to be confusing to others.  If you use FORMAT
  9156.               /S with MS-DOS or PC-DOS 4.0 or above, we recommend that you
  9157.               copy COMMAND.COM manually to the floppy disk (you can use an
  9158.               alias or batch file if you format bootable disks frequently),
  9159.               or rename the file that FORMAT copies to 4DOS.COM and place a
  9160.               proper CONFIG.SYS file for 4DOS on the floppy disk.
  9161.  
  9162.  
  9163.           ___________________________________________________________________
  9164.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  153
  9165.  
  9166.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9167.           ___________________________________________________________________
  9168.  
  9169.  
  9170.  
  9171.  
  9172.               Using 4DOS with Task Switchers and Multitaskers
  9173.  
  9174.               Task switchers are programs that allow you to switch quickly
  9175.               among multiple applications, with one application running at a
  9176.               time.  Multitaskers are more complex programs which run
  9177.               multiple applications at the same time, with one or more
  9178.               programs executing "in the background" while you work with
  9179.               another program on the screen.
  9180.  
  9181.               For convenience, in the text below we will refer to both
  9182.               multitaskers and task switchers as "multitaskers," and to each
  9183.               window or partition they use as a "window," even though some
  9184.               do not have windowed displays.
  9185.  
  9186.               4DOS works well as both the primary shell (loaded when your
  9187.               system boots) and the secondary shell (loaded in a window)
  9188.               with most multitaskers.
  9189.  
  9190.               Most multitaskers have a pre-configured "DOS" window.  In some
  9191.               programs, this window always runs COMMAND.COM.  Others run
  9192.               whatever program COMSPEC points to, which means they will run
  9193.               4DOS if you boot up with 4DOS.  We recommend that you always
  9194.               set up a 4DOS window explicitly, with the configuration you
  9195.               want, rather that relying on the multitasker's generic "DOS"
  9196.               window.
  9197.  
  9198.               Many multitaskers also run the command processor when you
  9199.               start certain kinds of windows, such as windows that run a
  9200.               .BAT file.  In general, this use of the command processor is
  9201.               transparent.  The multitasker will run 4DOS for you
  9202.               automatically when it needs to, and you won't need to do
  9203.               anything about it.
  9204.  
  9205.               If you find that your multitasker is running COMMAND.COM when
  9206.               you meant to run 4DOS, check the COMSPEC setting that is in
  9207.               effect when you start the multitasker.  You may also need to
  9208.               check the way a particular window is configured.
  9209.  
  9210.               When you set up a 4DOS window, be sure to specify the full
  9211.               path to 4DOS.COM, and any command-line options you want (see
  9212.               page 114 for information on command line options).  To set
  9213.               parameters (swapping, alias space, etc.) to be used by all
  9214.               4DOS secondary shells run by your multitasker, use the
  9215.               [Secondary] section in 4DOS.INI (see page 121).  To set these
  9216.               parameters separately for a specific window, create a copy of
  9217.               4DOS.INI just for that window and use the @d:\path\inifile
  9218.  
  9219.  
  9220.           ___________________________________________________________________
  9221.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  154
  9222.  
  9223.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9224.           ___________________________________________________________________
  9225.  
  9226.  
  9227.               option on your command line for the window to tell 4DOS where
  9228.               to find 4DOS.INI.  To change the configuration of a specific
  9229.               window without creating a separate copy of 4DOS.INI, use the
  9230.               //iniline option on your command line for the window (see
  9231.               example below).
  9232.  
  9233.               4DOS allows you to place a command to be executed as the last
  9234.               parameter on your 4DOS command line.  This command is executed
  9235.               before 4DOS displays its first prompt.  You can use this
  9236.               feature to run a batch file (or any other command) each time a
  9237.               4DOS window is started by your multitasker.  For example, if
  9238.               you are setting up 4DOS to run as a DOS application under
  9239.               Windows 3.0, your command line might look this:
  9240.  
  9241.                    c:\4dos\4dos.com //swapping=f:\ c:\winstart.btm
  9242.  
  9243.               This tells Windows to load 4DOS, includes a 4DOS.INI directive
  9244.               to tell 4DOS to swap to drive F, and passes 4DOS the command
  9245.               C:\WINSTART.BTM.  You can place commands in C:\WINSTART.BTM to
  9246.               be executed whenever such a window is started (for example, to
  9247.               change your PROMPT to show that you're in a window, or to load
  9248.               a TSR for just that window).  The command to be executed
  9249.               (C:\WINSTART.BTM in this example), must be the last thing on
  9250.               the 4DOS command line;  no 4DOS switches or options can be
  9251.               placed after it because anything after the command will be
  9252.               interpreted as parameters for the command.
  9253.  
  9254.               This command feature is similar to what's provided by the
  9255.               4START batch file, but 4START is executed every time 4DOS
  9256.               loads, whereas a file like WINSTART will be executed only when
  9257.               a 4DOS window is started from your multitasker.  A batch file
  9258.               started this way will be run after 4START.
  9259.  
  9260.               If you use KEYSTACK inside a window of a multitasker, and the
  9261.               KSTACK.COM program has been loaded before the multitasker, you
  9262.               may find that stacked keystrokes "bleed through" from one
  9263.               window to another.  You can solve this problem by loading
  9264.               KSTACK.COM in a startup batch file (see above) for each window
  9265.               where it is needed.  If KSTACK is loaded before the
  9266.               multitasker as well, include a /I on the command line when
  9267.               loading KSTACK inside the window.  If you don't, KSTACK will
  9268.               detect that it is already installed and will not install
  9269.               again.
  9270.  
  9271.  
  9272.  
  9273.  
  9274.  
  9275.  
  9276.  
  9277.           ___________________________________________________________________
  9278.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  155
  9279.  
  9280.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9281.           ___________________________________________________________________
  9282.  
  9283.  
  9284.  
  9285.  
  9286.               Multitasking and Disk Swapping
  9287.  
  9288.               When 4DOS is loaded as the primary shell, it acts as a
  9289.               "traffic cop" for copies of the transient portion of 4DOS
  9290.               swapped to disk.  Each secondary shell is assigned a unique
  9291.               shell number, which is used as the extension of its disk swap
  9292.               file (4DOSSWAP.001, 4DOSSWAP.002, etc.).  These shell numbers
  9293.               avoid file name conflicts between multiple copies of 4DOS
  9294.               running in different windows but creating swap files in the
  9295.               same disk directory.
  9296.  
  9297.               However, if 4DOS is not loaded before the multitasker, this
  9298.               capability will not be available.  In this case, the copy of
  9299.               4DOS in each window will use a swap file called 4DOSSWAP.000.
  9300.               To avoid a conflict in this situation, you must either use the
  9301.               UniqueSwapName directive in 4DOS.INI, or force every copy of
  9302.               4DOS to place its swap file in its own unique directory by
  9303.               using the "Swapping=d:\path" directive in 4DOS.INI.  If you
  9304.               don't follow this rule, your system will hang when you switch
  9305.               windows or when you exit from an application.
  9306.  
  9307.               This problem will occur only in those rare situations where
  9308.               4DOS is loaded within a window but is not loaded as your
  9309.               primary shell, and if 4DOS disk swapping is used in more than
  9310.               one window at a time.  The problem will not occur if 4DOS is
  9311.               loaded as the primary shell (the usual case), or if 4DOS can
  9312.               use EMS or XMS swapping for all simultaneous shells.  Note
  9313.               that since the default swapping option uses disk swapping if
  9314.               insufficient EMS or XMS memory is available, you can be
  9315.               invoking disk swapping in your multitasker's windows without
  9316.               specifically requesting it.
  9317.  
  9318.  
  9319.               4DOS and Microsoft Windows 3.0
  9320.  
  9321.               4DOS works well as both the primary shell, loaded before
  9322.               Windows 3, and as a secondary shell loaded inside any window.
  9323.               It works in any Windows mode (Real, Standard, or Enhanced).
  9324.               The previous general information about multitaskers applies to
  9325.               Windows as well.  You should read it before continuing with
  9326.               this section.
  9327.  
  9328.               To run 4DOS as a secondary shell from within Windows, you will
  9329.               need to create a Program Manager icon to run 4DOS.  The
  9330.               generic "DOS" icon supplied by Microsoft will only run
  9331.  
  9332.  
  9333.  
  9334.           ___________________________________________________________________
  9335.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  156
  9336.  
  9337.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9338.           ___________________________________________________________________
  9339.  
  9340.  
  9341.               COMMAND.COM.  You can set up a 4DOS icon from the Program
  9342.               Manager's File / New menu selection.
  9343.  
  9344.               First, create a new program item and set the command line to
  9345.               "C:\4DOS\4DOS.COM" (use the appropriate drive and path for
  9346.               your system).  As discussed above, you can put the name of a
  9347.               batch file at the end of the command line.
  9348.  
  9349.               To install a special 4DOS icon, use the Program Manager's File
  9350.               / Properties menu selection.  Click on the Change Icon button
  9351.               and type in the full path name of your new 4DOS icon file.  We
  9352.               supply two Windows icons with 4DOS:  4DOS.ICO for color
  9353.               displays, and 4DOSM.ICO for monochrome displays.  Of course,
  9354.               you can create your own with any icon editor.
  9355.  
  9356.               For more flexibility, you can use the Windows PIF editor to
  9357.               create a 4DOS.PIF file.  We have included a sample .PIF file
  9358.               on the distribution diskette.  You must edit this file and
  9359.               make it correspond to your system before you use it to run
  9360.               4DOS.
  9361.  
  9362.               If you run Windows in 386 Enhanced mode, 4DOS will work
  9363.               properly in either a full-screen or a windowed session.  The
  9364.               .PIF file determines the mode that 4DOS will start in.  If you
  9365.               don't use a .PIF file, 4DOS will always start in full-screen
  9366.               mode.
  9367.  
  9368.               Your batch files can determine whether they are running in a
  9369.               secondary shell under Windows, and the current Windows mode,
  9370.               with the 4DOS _WIN environment variable (see page 84).
  9371.  
  9372.               You can easily set up the Windows File Manager so that it will
  9373.               consider .BTM files to be "executable".  Open your WIN.INI
  9374.               file with any editor and find the section labeled
  9375.               "[extensions]".  Add the following line to the end of the
  9376.               section:
  9377.  
  9378.                    btm=c:\4dos\4dos.com /c ^.btm
  9379.  
  9380.               (adjust this to show the proper path for 4DOS.COM on your
  9381.               system).  It is not possible to execute .BTM files from the
  9382.               Program Manager by modifying the Programs= setting in WIN.INI;
  9383.               if you try to do so, the system will hang when you attempt to
  9384.               actually invoke a BTM file.
  9385.  
  9386.  
  9387.  
  9388.  
  9389.  
  9390.  
  9391.           ___________________________________________________________________
  9392.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  157
  9393.  
  9394.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9395.           ___________________________________________________________________
  9396.  
  9397.  
  9398.  
  9399.  
  9400.               4DOS and DESQview
  9401.  
  9402.               4DOS works well as both the primary shell loaded before
  9403.               DESQview, and as the secondary shell loaded inside any
  9404.               DESQview window.  The previous general information about
  9405.               multitaskers applies to DESQview as well.  You should read it
  9406.               before continuing with this section.
  9407.  
  9408.               To use 4DOS as a secondary shell with DESQview, you must add
  9409.               it to your DESQview "Open Window" menu.  To do this, select
  9410.               the Add a Program option, then press the "O" key (for Other
  9411.               Program).  Press Enter and you will get an Add a Program
  9412.               window.  You'll need to modify settings on the standard first
  9413.               screen, and on the second "advanced options" screen.  Set the
  9414.               Program Name to C:\4DOS\4DOS.COM (adjust the drive and path
  9415.               for your own computer).  Set the Parameters to whatever 4DOS
  9416.               startup options you want, but do not use /C or /P.  For other
  9417.               DESQview parameters, the defaults are workable with the
  9418.               following changes:
  9419.  
  9420.                    To run 4DOS in a full-screen window:
  9421.  
  9422.                          Writes Text Directly to Screen:    Y    (screen 1)
  9423.                          Virtualize Text / Graphics:        N    (screen 1)
  9424.                          Close on Exit to DOS:              Y    (screen 2)
  9425.                          Uses its Own Colors:               Y    (screen 2)
  9426.  
  9427.                    To run 4DOS in a window smaller than the full screen:
  9428.  
  9429.                          Writes Text Directly to Screen:    N    (screen 1)
  9430.                          Virtualize Text / Graphics:        Y/T  (screen 1)
  9431.                          Close on Exit to DOS:              Y    (screen 2)
  9432.                          Uses its Own Colors:               Y    (screen 2)
  9433.  
  9434.               4DOS is written to be "DESQview-aware", and will not "bleed
  9435.               through" to other windows when running full-screen commands
  9436.               such as HELP, LIST, or SELECT.
  9437.  
  9438.               If you use 4DOS commands that work with an ANSI driver (CLS,
  9439.               COLOR, and the COLORDIR environment variable), you will need
  9440.               to load the ANSI driver in your 4DOS window.  Drivers like PC
  9441.               Magazine's ANSI.COM may work in full-screen windows, but we've
  9442.               found that the only ANSI driver which works properly in a
  9443.               window smaller than the full screen is Quarterdeck's
  9444.               DVANSI.COM.
  9445.  
  9446.  
  9447.  
  9448.           ___________________________________________________________________
  9449.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  158
  9450.  
  9451.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9452.           ___________________________________________________________________
  9453.  
  9454.  
  9455.  
  9456.               You can set up a startup batch file to load your ANSI driver
  9457.               or take other actions when a DESQview 4DOS window is opened,
  9458.               as discussed in the general section on multitaskers above.
  9459.               Just place the batch file name (with drive and path if
  9460.               necessary) as the last thing on the Parameters line.
  9461.  
  9462.               You should normally exit a DESQview 4DOS window with the EXIT
  9463.               command, rather than with the Close option on DESQview's main
  9464.               menu.  If you do use the Close option while at the 4DOS
  9465.               prompt, 4DOS will be notified of your action and will clean up
  9466.               its resources (for example, the shell number and disk swap
  9467.               file in use in that window).  However this notification has a
  9468.               side-effect:  it disables the Quit option on the DESQview main
  9469.               menu (this is a feature of DESQview).  To disable the
  9470.               notification and reenable the Quit option, you can use a
  9471.               DVCleanup = No directive in 4DOS.INI (see page 139).  If you
  9472.               do so, be sure to exit 4DOS windows with the EXIT command to
  9473.               avoid leaving stray swap files on your disk or inadvertently
  9474.               using up 4DOS shell numbers.
  9475.  
  9476.               DESQview will work properly with the UMBLoad and
  9477.               UMBEnvironment directives set to Yes for the primary shell in
  9478.               4DOS.INI, but may not work properly if these directives are
  9479.               also active in secondary shells.  If you have trouble with
  9480.               secondary shells and are using either of these directives, try
  9481.               placing the following lines in the [Secondary] section of
  9482.               4DOS.INI:
  9483.  
  9484.                    UMBLoad = No
  9485.                    UMBEnvironment = No
  9486.  
  9487.               If you want to use DESQview's DOS Services program, check
  9488.               APPNOTES.DOC for the details on how to set it up for use with
  9489.               4DOS.
  9490.  
  9491.  
  9492.               Using 4DOS on a Network
  9493.  
  9494.               4DOS works well with DOS-compatible networks.  This section
  9495.               will give you some tips on using 4DOS properly on a network,
  9496.               and on the locations to use for 4DOS files on a network.
  9497.  
  9498.               In general, you'll find that you can load and run your network
  9499.               software normally under 4DOS.  Network drives will be
  9500.               accessible as normal drives once the network is loaded, and
  9501.               files on the network will be accessible just as if they were
  9502.               on a local hard disk.
  9503.  
  9504.  
  9505.           ___________________________________________________________________
  9506.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  159
  9507.  
  9508.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9509.           ___________________________________________________________________
  9510.  
  9511.  
  9512.  
  9513.               Some networks support file and directory names beginning with
  9514.               a double backslash, or with a server name followed by a colon,
  9515.               to identify files by their location on the network.  4DOS
  9516.               detects such names and passes them through to the network
  9517.               unaltered, allowing the network software to process them
  9518.               properly.
  9519.  
  9520.               In rare situations, you may have trouble loading network
  9521.               software under 4DOS.  To the best of our knowledge, all DOS-
  9522.               compatible networks do work with 4DOS.  If yours doesn't, our
  9523.               experience suggests that the most common cause is a network
  9524.               bug, an old version of your network software, or a conflict in
  9525.               the way 4DOS and your network are configured.  Most bugs have
  9526.               now been corrected by network vendors, and should not appear
  9527.               on your system.  If you have any questions about compatibility
  9528.               with your particular network, first check for a listing in
  9529.               APPNOTES.DOC; then of course feel free to contact our
  9530.               technical support department for assistance.
  9531.  
  9532.               If you need to boot a diskless workstation from a network
  9533.               drive, you must have the network drive accessible at boot
  9534.               time.  If this condition is satisfied (so 4DOS can find its
  9535.               files on the network drives), the normal approach can be used
  9536.               to start 4DOS from the network.
  9537.  
  9538.               Some networks with large server disk drives (256 MB or more)
  9539.               may report values that are too small if the FREEcommand and
  9540.               the %@DISKFREE, %@DISKTOTAL, and %@DISKUSED variable functions
  9541.               are used for the server drive.  If this occurs, it is because
  9542.               the network software does not provide a way to return larger
  9543.               values to 4DOS.
  9544.  
  9545.             ! When you use 4DOS on a network, pay attention to where files
  9546.               are stored in order to ensure that two 4DOS users do not
  9547.               attempt to access the same 4DOS file at the same time.  You
  9548.               will need to pay particular attention to disk swapping and
  9549.               pipes.
  9550.  
  9551.               If 4DOS uses disk swapping (either because of an explicit
  9552.               directive in 4DOS.INI or because default swapping is used and
  9553.               no EMS or XMS memory is available), you should be sure that
  9554.               two users don't use the same directory simultaneously for
  9555.               their disk swap files.  If they do, the filenames
  9556.               (4DOSSWAP.000, 4DOSSWAP.001, etc.) will conflict and each user
  9557.               will write over the other's files, possibly causing one or
  9558.               both systems to hang.  To take care of this, use the Swapping
  9559.  
  9560.  
  9561.  
  9562.           ___________________________________________________________________
  9563.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  160
  9564.  
  9565.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9566.           ___________________________________________________________________
  9567.  
  9568.  
  9569.               directive in 4DOS.INI to assign each user's swap files to a
  9570.               different directory on the network drive.
  9571.  
  9572.               Pipes are a method of passing information from one program to
  9573.               another, and are invoked with the pipe symbol [|] on the
  9574.               command line (see page 66).  Pipes work by taking the output
  9575.               from one program, storing it in a temporary file, then telling
  9576.               a second program to obtain its input from that file.  The
  9577.               temporary files, with names like P1.$00 and P2.$00, are placed
  9578.               by default in the root directory of the boot drive, but can be
  9579.               placed on a different drive and directory by setting the TEMP
  9580.               or TEMP4DOS environment variable (see page 116).
  9581.  
  9582.               The same cautions given for disk swapping must be followed for
  9583.               pipe temporary files; that is, you must ensure that each
  9584.               user's temporary pipe files go to a separate directory.  To do
  9585.               this, just be sure that each network user running 4DOS has
  9586.               TEMP or TEMP4DOS set to a unique directory.  If you boot 4DOS
  9587.               from a local hard disk, the pipe temporary files will go to
  9588.               that disk and the environment variable setting will not be
  9589.               necessary.
  9590.  
  9591.  
  9592.           Solving Software Compatibility Problems
  9593.  
  9594.               Any DOS program running on your computer can potentially
  9595.               interact with any other program running at the same time.  Of
  9596.               course, most program interactions are ones you want: your
  9597.               print spooler intercepts printer output and saves it to print
  9598.               later, or your disk cache intercepts disk requests and speeds
  9599.               them up by retrieving data from memory.
  9600.  
  9601.               If you've used the PC for any length of time, however, you'll
  9602.               know that you can also get interactions you don't want.  If
  9603.               you load just the wrong combination of TSRs and device
  9604.               drivers, your system may slow to a crawl.  Perhaps you can't
  9605.               load your favorite Personal Information Manager with Windows
  9606.               running.  And so on.
  9607.  
  9608.               As publishers of a product that replaces part of the operating
  9609.               system, we're very familiar with these issues -- not because
  9610.               4DOS is more likely to cause problems, but because it
  9611.               sometimes gets blamed first when a problem appears.  Our
  9612.               technical support department has developed a set of reliable
  9613.               techniques for finding out what's causing an apparent
  9614.               compatibility problem with 4DOS and other software.
  9615.  
  9616.  
  9617.  
  9618.  
  9619.           ___________________________________________________________________
  9620.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  161
  9621.  
  9622.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9623.           ___________________________________________________________________
  9624.  
  9625.  
  9626.  
  9627.               We are presenting these techniques here as a series of things
  9628.               to try when there seems to be a compatibility problem.  Some
  9629.               may not make sense for the particular problem you're
  9630.               investigating.  Others may not yield useful results.  But as a
  9631.               group, they'll help you resolve many of the common software
  9632.               interactions that do appear, whether with 4DOS or anything
  9633.               else.
  9634.  
  9635.               Some of our suggestions help you figure out what's going on,
  9636.               but aren't intended to help you fix it.  For example, when we
  9637.               suggest that you remove all your TSRs to look for the problem,
  9638.               we aren't suggesting that as a permanent solution, but only as
  9639.               a diagnostic test.  Before you get started, be sure to check
  9640.               APPNOTES.DOC to see if we've already solved the problem you're
  9641.               facing.
  9642.  
  9643.               The first thing to consider is whether the particular
  9644.               combination of software that's not working used to work
  9645.               together.  If so, think carefully about what you have changed
  9646.               and see if reversing the change solves the problem.  If it
  9647.               does, then you can narrow your search, using the following
  9648.               techniques to find out what it is about that specific change
  9649.               that is causing the problem.
  9650.  
  9651.               Second, make sure that your problem can be reproduced
  9652.               relatively easily, and make sure you know exactly what
  9653.               sequence of commands or other steps reproduces it.  Most
  9654.               interactions are very easy to reproduce, but if you think
  9655.               there's an interaction and it occurs once every 10 days, it's
  9656.               going to be difficult to know when you have fixed it.  Also,
  9657.               the process of carefully documenting how to reproduce a
  9658.               problem often helps you realize what the problem is without
  9659.               further effort.
  9660.  
  9661.               Third, if you have a problem with a specific application
  9662.               hanging or working improperly, try cleaning up the
  9663.               "atmosphere" in which that program runs.  This is the single
  9664.               most useful tool we know for finding compatibility problems.
  9665.               By "cleaning up the atmosphere" we mean all of the following,
  9666.               and any other similar things you may be able to think of about
  9667.               your particular system after reading our suggestions below:
  9668.  
  9669.                    Check the length of your PATH variable.  4DOS lets you
  9670.                    make it longer than the standard limit of 123 characters.
  9671.                    Some programs can't handle long PATHs and may behave
  9672.                    strangely.  If your PATH is over the normal limit, reduce
  9673.                    its size using the PATH or ESET command and see if the
  9674.  
  9675.  
  9676.           ___________________________________________________________________
  9677.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  162
  9678.  
  9679.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9680.           ___________________________________________________________________
  9681.  
  9682.  
  9683.                    application starts working.  If so, use a batch file or
  9684.                    alias to set up an alternate path for running that one
  9685.                    program, for example:
  9686.  
  9687.                         setlocal
  9688.                         path d:\myprog
  9689.                         d:\myprog\myprog.exe
  9690.                         endlocal
  9691.  
  9692.                    The SETLOCAL / ENDLOCAL pair saves and restores the
  9693.                    environment;  when you're done, the old PATH will be
  9694.                    restored automatically (see page 305).
  9695.  
  9696.                    Next, check how much environment space is in use in your
  9697.                    system.  The 4DOS MEMORY command reports the total
  9698.                    environment space and the amount free; a simple
  9699.                    subtraction tells you how much is in use.  Some programs
  9700.                    use outdated techniques and simply don't work right if
  9701.                    there's a lot of information in the environment (these
  9702.                    programs don't usually care how big the total environment
  9703.                    space is, only how much of it is actually in use).  In
  9704.                    most cases, these problems show up when the amount of
  9705.                    space in use gets up to around 1K (1024) bytes or so, but
  9706.                    they can occur at any point. To test for this, use the
  9707.                    following simple batch file:
  9708.  
  9709.                         setlocal
  9710.                         unset var1 var2 var3 ...
  9711.                         [command to run the program in question]
  9712.                         endlocal
  9713.  
  9714.                    where VAR1, VAR2, etc. are variables you can remove from
  9715.                    the environment to decrease the space in use before
  9716.                    running the program.  If reducing the environment space
  9717.                    in use makes things work, contact the program's
  9718.                    manufacturer and report the problem.  You have found a
  9719.                    legitimate bug.  DOS allows an environment of up to 32K
  9720.                    and all programs should be able to work with an
  9721.                    environment that large.  Until the manufacturer fixes the
  9722.                    bug, use the batch file above as a workaround.
  9723.  
  9724.                    Next, look for a multi-program interaction.  Remove all
  9725.                    the device drivers and TSRs you possibly can and still
  9726.                    have enough software present to demonstrate the problem.
  9727.                    For example, you can't look for a network problem if you
  9728.                    don't load the network, but you probably can check it
  9729.                    without your disk cache running.  When you do this, and
  9730.  
  9731.  
  9732.  
  9733.           ___________________________________________________________________
  9734.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  163
  9735.  
  9736.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9737.           ___________________________________________________________________
  9738.  
  9739.  
  9740.                    any time you modify your boot configuration, be sure you
  9741.                    have a bootable floppy disk handy.
  9742.  
  9743.                    If you run a partitioning disk driver like SpeedStor,
  9744.                    Vfeature, or Disk Manager, you probably can't remove it
  9745.                    for diagnostic purposes without temporarily losing access
  9746.                    to some or all of your hard disk.  The same may be true
  9747.                    of disk compression programs like Stacker, depending on
  9748.                    the mode in which they are installed.  Most other device
  9749.                    drivers and TSRs can be removed without causing trouble.
  9750.                    Check your system and software manuals if you are unsure
  9751.                    of which programs can safely be removed.
  9752.  
  9753.                    Once you know what you can take out, don't skimp or guess
  9754.                    where the interaction might be.  Take out everything you
  9755.                    possibly can from CONFIG.SYS, 4START, and AUTOEXEC.BAT
  9756.                    that loads or accesses another program .  In CONFIG.SYS,
  9757.                    remove all possible DEVICE and INSTALL statements.  In
  9758.                    AUTOEXEC.BAT, remove all the lines you can that load
  9759.                    memory-resident programs (and remember that some DOS
  9760.                    utilities, like MODE, can be memory-resident).  Of
  9761.                    course, save copies of your configuration files before
  9762.                    you delete anything.  Better yet, use the REM command to
  9763.                    remove lines temporarily without deleting them.  REM can
  9764.                    be used on any line in AUTOEXEC.BAT, in 4START, and in
  9765.                    CONFIG.SYS if you are running DOS 4.0 or above.  In
  9766.                    earlier versions, REM will work in CONFIG.SYS but will
  9767.                    also generate a harmless "unrecognized command" error
  9768.                    message during bootup.  If you want to remove everything
  9769.                    in AUTOEXEC.BAT you can simply rename it to any other
  9770.                    name, and rename it back when you are done testing.
  9771.  
  9772.                    Clean out your configuration files all at once, not one
  9773.                    line at a time.  If that solves the problem, you're on
  9774.                    the right track, and you can put the lines back one at a
  9775.                    time until you find the culprit.  If it doesn't solve the
  9776.                    problem, you won't waste time removing lines one by one.
  9777.  
  9778.                    If you do find a suspect program, first try booting your
  9779.                    system with COMMAND.COM, without changing anything else
  9780.                    about your configuration.  If the problem remains, then
  9781.                    it's not related to an interaction with 4DOS.
  9782.  
  9783.                    If the problem isn't there under COMMAND.COM, try
  9784.                    fiddling with the program's configuration. If you were
  9785.                    loading it high, try loading it low.  If you can change
  9786.                    the way it uses memory, try doing so.  If it's a driver
  9787.                    that's used by other programs (like your mouse driver)
  9788.  
  9789.  
  9790.           ___________________________________________________________________
  9791.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  164
  9792.  
  9793.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9794.           ___________________________________________________________________
  9795.  
  9796.  
  9797.                    and is quite old, consider obtaining an update from the
  9798.                    manufacturer. All of these techniques will help you
  9799.                    narrow down what it is about the program that's causing a
  9800.                    problem.  Once you have done that, you may have a simple
  9801.                    workaround.  If not, contact our technical support crew
  9802.                    and we'll try to verify the problem, then resolve it with
  9803.                    the manufacturer of the other software.
  9804.  
  9805.                    Rarely, some problems can be resolved by modifying the
  9806.                    order in which you load drivers and TSRs.  If you've
  9807.                    found a problem with a particular driver or TSR, try
  9808.                    loading it earlier or later than you were and see if the
  9809.                    problem goes away.
  9810.  
  9811.               Next, try modifying the atmosphere in another way:  change the
  9812.               way 4DOS is configured.  In particular, try changing the 4DOS
  9813.               swapping type using the Swapping directive in 4DOS.INI (see
  9814.               page 126).  This technique is especially appropriate if the
  9815.               system hangs every time you exit a particular application.  If
  9816.               that solves the problem, there's probably a memory conflict.
  9817.               Another program is trying to use the same memory space 4DOS
  9818.               uses for swapping.  See if you can control the other program's
  9819.               memory usage.
  9820.  
  9821.               If you can configure 4DOS and the other program to work
  9822.               together, you're all set.  If they work together only in a
  9823.               useless combination (for example, with 4DOS swapping turned
  9824.               off), contact us.  We'll try to figure out what the other
  9825.               program is doing to damage 4DOS's swap space and get the
  9826.               manufacturer to take care of the problem.
  9827.  
  9828.               You can also change the UMB-related configuration settings
  9829.               (UMBLoad and UMBEnvironment) to help diagnose compatibility
  9830.               problems.  Problems with these directives are rare, but if
  9831.               you're at an impasse, try setting both of these values to "No"
  9832.               in 4DOS.INI.
  9833.  
  9834.               Some of the advanced directives in 4DOS.INI (see page 138) may
  9835.               help solve very rare configuration problems, but unless you
  9836.               are an experienced DOS user and understand the side effects of
  9837.               each directive, they should be used only as diagnostic tools,
  9838.               and not as a workaround or fix. Any of the following can be
  9839.               tried:
  9840.  
  9841.                    Inherit = No
  9842.                    LineInput = Yes      (or SETDOS /L1)
  9843.                    Reduce = No
  9844.                    StackSize = nnnn     (increase value to 4096 or more)
  9845.  
  9846.  
  9847.           ___________________________________________________________________
  9848.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  165
  9849.  
  9850.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9851.           ___________________________________________________________________
  9852.  
  9853.  
  9854.  
  9855.               If you've tried all these techniques and haven't found the
  9856.               problem, contact our technical support department (see page
  9857.               7).  We have more tricks up our sleeve, and a very high
  9858.               success rate at resolving software interactions.
  9859.  
  9860.  
  9861.  
  9862.  
  9863.  
  9864.  
  9865.  
  9866.  
  9867.  
  9868.  
  9869.  
  9870.  
  9871.  
  9872.  
  9873.  
  9874.  
  9875.  
  9876.  
  9877.  
  9878.  
  9879.  
  9880.  
  9881.  
  9882.  
  9883.  
  9884.  
  9885.  
  9886.  
  9887.  
  9888.  
  9889.  
  9890.  
  9891.  
  9892.  
  9893.  
  9894.  
  9895.  
  9896.  
  9897.  
  9898.  
  9899.  
  9900.  
  9901.  
  9902.  
  9903.  
  9904.           ___________________________________________________________________
  9905.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  166
  9906.  
  9907.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  9908.           ___________________________________________________________________
  9909.  
  9910.  
  9911.  
  9912.           CHAPTER 8 / COMMAND REFERENCE GUIDE
  9913.  
  9914.  
  9915.           The following pages are a complete guide and reference to the 4DOS
  9916.           commands that are available from the command line, in aliases, and
  9917.           in batch files.  Nearly all of these commands are internal 4DOS
  9918.           commands, which means that 4DOS performs the activity you have
  9919.           requested without running another program.  External commands
  9920.           require loading and running a separate program, either an
  9921.           executable (.EXE or .COM) program or a batch (.BTM or .BAT)
  9922.           program.  DOS is shipped with a number of external utility programs
  9923.           (such as FORMAT and DISKCOPY), and any program or application you
  9924.           install on your system becomes a new external command.
  9925.  
  9926.           The advantage of internal commands is that they run almost
  9927.           instantly.  When you give 4DOS an internal command, it interprets
  9928.           the command line and carries out the necessary activities without
  9929.           having to look for, load, and run another program.
  9930.  
  9931.           The advantage of external commands is that they can be large,
  9932.           varied, and complex without taking space inside the system command
  9933.           processor.  External commands can also be renamed or replaced
  9934.           easily.  If you want to rename the external DOS command XCOPY to
  9935.           MYCOPY, for example, all you need to do is find the file called
  9936.           XCOPY.EXE on your DOS disk or directory and change its name to
  9937.           MYCOPY.EXE.  If you want to replace XCOPY with a more efficient
  9938.           program, you can do so.  4DOS adds this flexibility to internal
  9939.           commands.  You can rename or replace any internal command by using
  9940.           an ALIAS, and you can enable or disable internal commands whenever
  9941.           you wish.
  9942.  
  9943.  
  9944.           4DOS Commands
  9945.  
  9946.               4DOS has over 80 internal commands, many more than any version
  9947.               of DOS.  4DOS neither replaces nor interferes with external
  9948.               DOS commands like ASSIGN, BACKUP, CHKDSK, DISKCOPY, SUBST, or
  9949.               XCOPY.  Once 4DOS is installed, you can continue to use those
  9950.               utilities like you always have.  Also, 4DOS has been designed
  9951.               so that it is compatible with virtually all traditional
  9952.               internal commands, even though it enhances many of those
  9953.               commands with additional options and capabilities.  Once you
  9954.               have installed 4DOS, you can continue using the commands that
  9955.               you already know and get the same results.
  9956.  
  9957.               A few of the 4DOS commands are the same as traditional
  9958.               commands, some are enhanced with new features, and many are
  9959.  
  9960.  
  9961.           ___________________________________________________________________
  9962.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  167
  9963.  
  9964.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  9965.           ___________________________________________________________________
  9966.  
  9967.  
  9968.               unique to 4DOS.  The best way to learn the 4DOS commands is to
  9969.               use them and experiment with them.  The following lists
  9970.               categorize the available commands by topic and will help you
  9971.               find the ones that you need.  Most of this chapter is an
  9972.               alphabetic list of the commands and how to use each one.  We
  9973.               urge you to browse through this chapter occasionally and look
  9974.               for commands that might help simplify your computing life.
  9975.  
  9976.               In the following summary lists, commands that are unique to
  9977.               4DOS are marked with a  number sign [#].  Those which are
  9978.               enhanced traditional commands are marked with an asterisk [*].
  9979.               And those which are identical to traditional commands have no
  9980.               marks at all.
  9981.  
  9982.               System Configuration Commands:
  9983.  
  9984.                  BREAK          CHCP           CTTY           DATE
  9985.                  FREE #         LH / LOADHIGH  MEMORY #       PROMPT *
  9986.                  REBOOT #       SETDOS #       SWAPPING #     TIME
  9987.                  VER            VERIFY         VOL *
  9988.  
  9989.               File and directory management:
  9990.  
  9991.                  ATTRIB *       COPY *         DEL / ERASE *  DESCRIBE #
  9992.                  MOVE #         REN / RENAME * TRUENAME #
  9993.  
  9994.               Subdirectory management:
  9995.  
  9996.                  CD / CHDIR *   CDD #          DIR *          DIRS #
  9997.                  MD / MKDIR *   POPD #         PUSHD #        RD / RMDIR *
  9998.  
  9999.               Commands normally used in batch files and aliases (many are
  10000.               also useful at the command line):
  10001.  
  10002.                  ALIAS #        BEEP #         CALL           CANCEL #
  10003.                  COLOR #        DELAY #        DRAWBOX #      DRAWHLINE #
  10004.                  DRAWVLINE #    ECHO *         ECHOS #        ENDLOCAL #
  10005.                  GOSUB #        GOTO *         FOR *          IF *
  10006.                  IFF #          INKEY #        INPUT #        KEYSTACK #
  10007.                  LOADBTM #      PAUSE *        QUIT #         REM *
  10008.                  RETURN #       SCREEN #       SCRPUT #       SETLOCAL #
  10009.                  SHIFT *        TEXT #         TIMER #        UNALIAS #
  10010.                  VSCRPUT #
  10011.  
  10012.               Other commands:
  10013.  
  10014.                  ? #            CLS *          ESET #         EXCEPT #
  10015.                  EXIT *         GLOBAL #       HELP #         HISTORY #
  10016.  
  10017.  
  10018.           ___________________________________________________________________
  10019.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  168
  10020.  
  10021.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  10022.           ___________________________________________________________________
  10023.  
  10024.  
  10025.                  LIST #         LOG #          PATH *         SELECT #
  10026.                  SET *          TEE #          TYPE *         UNSET #
  10027.                  Y #
  10028.  
  10029.               As you can see, most 4DOS commands are either enhanced
  10030.               traditional commands or are entirely new.  If you are
  10031.               comfortable using traditional commands, you can switch to 4DOS
  10032.               without making any changes in your habits.  But you will be
  10033.               missing a lot of the power of 4DOS's enhancements and new
  10034.               commands unless you take a few minutes to see what's available
  10035.               here.  Make sure you don't skip a section of this reference
  10036.               just because you already know how to use a traditional command
  10037.               with the same name.
  10038.  
  10039.               We have made no attempt to document external DOS commands in
  10040.               this reference, partly because they are explained in your DOS
  10041.               manual, and partly because the number and name of DOS external
  10042.               commands, and the options available with each command, vary
  10043.               widely from one version of DOS to another and from one
  10044.               computer manufacturer to another.  The 4DOS HELP system does
  10045.               include information on standard DOS external commands.
  10046.  
  10047.               If you come across terms or concepts in this chapter that you
  10048.               are unsure about, please refer to Chapter 4 / General
  10049.               Concepts, the Glossary on page 351, or the Index.
  10050.  
  10051.  
  10052.           How to Use the Command Descriptions
  10053.  
  10054.               Each of the 4DOS commands is described in detail on the
  10055.               following pages.  The descriptions are arranged
  10056.               alphabetically, and each includes examples that will help you
  10057.               learn to use the commands.
  10058.  
  10059.               Each description begins with the name of the command on the
  10060.               left side of the page and a word in parentheses on the right
  10061.               side.  The commands marked "New" are unique to 4DOS.  Those
  10062.               marked "Enhanced" are similar to traditional commands but add
  10063.               new features and options.  The commands marked "Compatible"
  10064.               follow the syntax and features of the traditional command with
  10065.               the same name.
  10066.  
  10067.               The name is followed by a sentence or two that briefly
  10068.               describes the command's purpose or major function.  That
  10069.               sentence should help you determine quickly whether you have
  10070.               found the command you are seeking.
  10071.  
  10072.  
  10073.  
  10074.  
  10075.           ___________________________________________________________________
  10076.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  169
  10077.  
  10078.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  10079.           ___________________________________________________________________
  10080.  
  10081.  
  10082.  
  10083.               The next part of each description shows the command's format
  10084.               or syntax.  The format line uses certain conventions to
  10085.               describe how the command should be entered and to create
  10086.               reference points for the text describing the command:
  10087.  
  10088.                    Words in UPPER CASE must be spelled exactly as they are
  10089.                    shown (although you can type them in using either upper
  10090.                    or lower case, or a combination).  If a word is shown
  10091.                    partly in upper case (for example BLInk), only the upper
  10092.                    case portion is required, the rest is optional.
  10093.  
  10094.                    Words shown in italics (for example source or filename)
  10095.                    are meant to be replaced by other words or values.  Each
  10096.                    of these words is explained directly beneath the format
  10097.                    line, and discussed in more detail in the text
  10098.                    description of the command.  When the word stands for a
  10099.                    file name, the name may be a simple file name like
  10100.                    MYFILE.TXT or it may include a drive letter and/or a full
  10101.                    path, like C:\MYDIR1\MYDIR2\MYFILE.TXT.  If the command
  10102.                    can work on multiple files, you can use the 4DOS
  10103.                    wildcards, multiple file names, or an include list (see
  10104.                    pages 71, 74, and 75).
  10105.  
  10106.                    Anything followed by an ellipsis (three periods [...])
  10107.                    may be repeated as often as you wish.
  10108.  
  10109.                    Text shown in [square brackets] is optional.  Text
  10110.                    outside of square brackets must be entered literally (if
  10111.                    it is capitalized) or replaced by other words or values
  10112.                    (if it is in italics).
  10113.  
  10114.                    Vertical bars | represent a choice;  you can pick one
  10115.                    option or another but not both.  For example, the
  10116.                    following format shows that the command may be followed
  10117.                    by the word ON or the word OFF, but not both:
  10118.  
  10119.                         COMMAND [ ON | OFF ]
  10120.  
  10121.                    A slash followed by a letter, like [/X], is an "option"
  10122.                    or "switch" which controls the effect of a command.  Many
  10123.                    commands have several switches, and you are usually free
  10124.                    to use none, one, or several to make a command behave as
  10125.                    you wish.  If you use a single switch, you must precede
  10126.                    it with a slash.  If you use several switches, in most
  10127.                    cases you can put them together with one slash or use
  10128.                    separate slashes.  For example, if you wanted to use
  10129.  
  10130.  
  10131.  
  10132.           ___________________________________________________________________
  10133.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  170
  10134.  
  10135.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  10136.           ___________________________________________________________________
  10137.  
  10138.  
  10139.                    switches X, Y, and Z for a command, you could type them
  10140.                    three different ways:
  10141.  
  10142.                         command /x /y /z
  10143.                         command /x/y/z
  10144.                         command /xyz
  10145.  
  10146.                    A few switches, particularly in the DIR and SELECT
  10147.                    commands,  use two or more characters.  If you need to
  10148.                    follow a multi-letter switch with another switch, the
  10149.                    second switch must have its own slash to avoid ambiguity.
  10150.  
  10151.               Included in the format section is an explanation of each
  10152.               replaceable argument and a one or two word explanation of each
  10153.               switch.  Many descriptions also list related commands to help
  10154.               you find the exact command you want.
  10155.  
  10156.               After the command format, you'll find a description of the
  10157.               command's usage.  This description normally starts with the
  10158.               basic functions of a command and gradually adds more details.
  10159.               We've also included many examples to help you see the command
  10160.               in action.  In the examples, characters in bold type represent
  10161.               input from the user.  Characters in normal type represent 4DOS
  10162.               prompts or responses, or lines in a batch file.
  10163.  
  10164.               The last part of each description is a detailed explanation of
  10165.               the options or switches available for each command, in
  10166.               alphabetical order.  Occasionally, we've included more
  10167.               examples in this section to demonstrate how a switch is used
  10168.               or how multiple switches interact.
  10169.  
  10170.               Pay careful attention to the information about switch
  10171.               placement.  Some switches have different effects based on
  10172.               where they appear in the command line.  The effects of
  10173.               switches occasionally vary from one command to another in
  10174.               order to retain compatibility with traditional commands.
  10175.  
  10176.               In the Usage and Options sections you may see the symbol## .
  10177.               This indicates a more in-depth discussion or an advanced topic
  10178.               which you can skip if you are new to the command; come back to
  10179.               this topic later for more details, or if you're having trouble
  10180.               with the command.  In most cases the remainder of the section
  10181.               after such a symbol is devoted to similar information.
  10182.  
  10183.               The ## doesn't mean that only advanced users will need the
  10184.               information -- you may find it useful even if you're
  10185.               relatively new to computers or to 4DOS.  But it does mean that
  10186.               you can skip the marked section and still understand and use
  10187.  
  10188.  
  10189.           ___________________________________________________________________
  10190.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  171
  10191.  
  10192.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  10193.           ___________________________________________________________________
  10194.  
  10195.  
  10196.               the basic features of the command.  If a ## appears before the
  10197.               "Usage" heading, it indicates that the entire command is
  10198.               generally used only in unusual situations or by more advanced
  10199.               users.
  10200.  
  10201.               When you see a ## in the list of options, remember that the
  10202.               options are listed alphabetically, so there may be more basic
  10203.               options discussed later in the list, after a more complex or
  10204.               advanced option marked with## .  Don't stop reading the option
  10205.               list the first time you see the mark.
  10206.  
  10207.               A ! to the left of a paragraph means that paragraph contains a
  10208.               caution or warning you may need to observe when using the
  10209.               feature it discusses.
  10210.  
  10211.  
  10212.  
  10213.  
  10214.  
  10215.  
  10216.  
  10217.  
  10218.  
  10219.  
  10220.  
  10221.  
  10222.  
  10223.  
  10224.  
  10225.  
  10226.  
  10227.  
  10228.  
  10229.  
  10230.  
  10231.  
  10232.  
  10233.  
  10234.  
  10235.  
  10236.  
  10237.  
  10238.  
  10239.  
  10240.  
  10241.  
  10242.  
  10243.  
  10244.  
  10245.  
  10246.           ___________________________________________________________________
  10247.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  172
  10248.  
  10249.                                     CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ?
  10250.           ___________________________________________________________________
  10251.  
  10252.  
  10253.           ?                                                             (New)
  10254.  
  10255.           Purpose:    Display a list of 4DOS commands.
  10256.  
  10257.           Format:     ?
  10258.  
  10259.           Usage:      ? displays a list of 4DOS internal commands.  For help
  10260.                       with these commands, and with external DOS commands,
  10261.                       see the HELP command.
  10262.  
  10263.                       When you use the ? command, you will see a display like
  10264.                       this:
  10265.  
  10266.                            c:\> ?
  10267.                            ?            ALIAS       ATTRIB       BEEP
  10268.                            BREAK        CALL        CANCEL       CD
  10269.                            CDD          CHCP        CHDIR        CLS
  10270.                            COLOR        COPY        CTTY         DATE
  10271.                            DEL          DELAY       DESCRIBE     DIR
  10272.                            DIRS         DRAWBOX     DRAWHLINE    DRAWVLINE
  10273.                            ECHO         ECHOS       ENDLOCAL     ERASE
  10274.                            ESET         EXCEPT      EXIT         FOR
  10275.                            FREE         GLOBAL      GOSUB        GOTO
  10276.                            HELP         HISTORY     IF           IFF
  10277.                            INKEY        INPUT       KEYSTACK     LH
  10278.                            LIST         LOADBTM     LOADHIGH     LOG
  10279.                            MD           MEMORY      MKDIR        MOVE
  10280.                            PATH         PAUSE       POPD         PROMPT
  10281.                            PUSHD        QUIT        RD           REBOOT
  10282.                            REM          REN         RENAME       RETURN
  10283.                            RMDIR        SCREEN      SCRPUT       SELECT
  10284.                            SET          SETDOS      SETLOCAL     SHIFT
  10285.                            SWAPPING     TEE         TEXT         TIME
  10286.                            TIMER        TRUENAME    TYPE         UNALIAS
  10287.                            UNSET        VER         VERIFY       VOL
  10288.                            VSCRPUT      Y
  10289.  
  10290.                       If you have disabled a command with the SETDOS /I
  10291.                       command, it will not appear in the list.
  10292.  
  10293.  
  10294.  
  10295.  
  10296.  
  10297.  
  10298.  
  10299.  
  10300.  
  10301.  
  10302.  
  10303.           ___________________________________________________________________
  10304.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  173
  10305.  
  10306.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10307.           ___________________________________________________________________
  10308.  
  10309.  
  10310.           ALIAS                                                         (New)
  10311.  
  10312.           Purpose:    Create new command names that execute one or more
  10313.                       commands or redefine default options for existing
  10314.                       commands;  assign commands to keystrokes;  load or
  10315.                       display the list of defined alias names.
  10316.  
  10317.           Format:     ALIAS [/P /R file...] [name[=][value]]
  10318.  
  10319.                       file:  One or more files to read for alias definitions.
  10320.                       name:  Name for an alias, or the key to execute the
  10321.                       alias.
  10322.                       value:  Text (commands, etc.) to be substituted for the
  10323.                       alias name.
  10324.  
  10325.                       /P(ause)                    /R(ead file)
  10326.  
  10327.                       See also: UNALIAS and page 97.
  10328.  
  10329.           Usage:      The ALIAS command lets you create new command names or
  10330.                       redefine the 4DOS internal commands.  It also lets you
  10331.                       assign one or more commands to a single keystroke.  An
  10332.                       alias is often used to execute a complex series of
  10333.                       commands with a few keystrokes or to create "in memory
  10334.                       batch files" that run much faster than disk-based batch
  10335.                       files.
  10336.  
  10337.                       For example, if you would rather type D instead of DIR
  10338.                       /W you would use the command:
  10339.  
  10340.                            c:\> alias d = `dir /w`
  10341.  
  10342.                       Now when you type a single d as a command, 4DOS will
  10343.                       translate it into a DIR /W command.  The marks around
  10344.                       DIR /W in the ALIAS command are back-quotes, below the
  10345.                       tilde [~] on most PC keyboards.  They are NOT single
  10346.                       quotes ['].
  10347.  
  10348.                       An alias can represent more than one command.  For
  10349.                       example:
  10350.  
  10351.                            c:\> alias letters = `cd \letters ^ text`
  10352.  
  10353.                       creates a new command called LETTERS.  The command
  10354.                       first uses CD to change to a subdirectory called
  10355.                       \LETTERS and then runs a program called TEXT.  The
  10356.                       caret [^] is the 4DOS command separator and tells 4DOS
  10357.  
  10358.  
  10359.  
  10360.           ___________________________________________________________________
  10361.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  174
  10362.  
  10363.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10364.           ___________________________________________________________________
  10365.  
  10366.  
  10367.                       that the two commands are distinct and should be
  10368.                       executed sequentially.
  10369.  
  10370.                       When you type alias commands at the command line or in
  10371.                       a batch file, you MUST use back quotes around the
  10372.                       definition if it contains multiple commands or any
  10373.                       replaceable parameters (which are discussed below), to
  10374.                       prevent premature expansion of the arguments.  You MAY
  10375.                       use back quotes [`] around other definitions, but they
  10376.                       are not required.  To avoid confusion, we recommend
  10377.                       that you always use back quotes around alias
  10378.                       definitions you type at the command line or enter in a
  10379.                       batch file.
  10380.  
  10381.                       Aliases may invoke internal 4DOS commands, external
  10382.                       commands, or other aliases.  (However, an alias may not
  10383.                       invoke itself, except in special cases where an IF or
  10384.                       IFF command is used to prevent an infinite loop.)  The
  10385.                       two aliases below demonstrate alias nesting (one alias
  10386.                       invoking another).  The first line defines an alias
  10387.                       which runs a program called WP.EXE that is in the
  10388.                       E:\WP51\ subdirectory.  The second alias changes
  10389.                       directories with the PUSHD command, runs the WP alias,
  10390.                       and then returns to the original directory with the
  10391.                       POPD command:
  10392.  
  10393.                            c:\> alias wp = `e:\wp51\wp.exe`
  10394.                            c:\> alias w = `pushd c:\wp ^ wp ^ popd`
  10395.  
  10396.                       The second alias above could have included the full
  10397.                       path and name of the WP.EXE program instead of calling
  10398.                       the WP alias.  However, writing two aliases makes the
  10399.                       second one easier to read and understand, and makes the
  10400.                       first alias available for independent use.  If you
  10401.                       rename the WP.EXE program or move it to a new
  10402.                       directory, only the first alias needs to rewritten.
  10403.  
  10404.                       If you put an asterisk [*] immediately before a command
  10405.                       in the value of an alias definition (the part after the
  10406.                       equal sign), it tells 4DOS not to attempt to interpret
  10407.                       that command as another (nested) alias.  An asterisk
  10408.                       used this way must be preceded by a space or caret [^]
  10409.                       and followed immediately by an internal or external
  10410.                       command name.  The asterisk is used to make sure that
  10411.                       4DOS interprets the following word as the name of an
  10412.                       internal or external command instead of as an alias
  10413.                       which may have the same name.  It also allows two
  10414.                       popular uses of aliases.
  10415.  
  10416.  
  10417.           ___________________________________________________________________
  10418.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  175
  10419.  
  10420.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10421.           ___________________________________________________________________
  10422.  
  10423.  
  10424.  
  10425.                       By using an asterisk, you can redefine the default
  10426.                       options for any 4DOS command.  For example, suppose
  10427.                       that you always want to use the DIR command with the /2
  10428.                       (two column) and /P (pause at the end of each page)
  10429.                       options.  The following line will do just that:
  10430.  
  10431.                            c:\> alias dir = `*dir /2/p`
  10432.  
  10433.                       If you didn't include the asterisk, 4DOS would
  10434.                       interpret the second DIR on the line as the name of the
  10435.                       alias itself and attempt to repeatedly re-invoke the
  10436.                       DIR alias, rather than running the DIR command.  This
  10437.                       would cause an "Alias loop" or "Command line too long"
  10438.                       error.  The asterisk tells 4DOS to interpret the second
  10439.                       DIR as a command but not as an alias.
  10440.  
  10441.                       An asterisk also helps you keep the names of internal
  10442.                       4DOS commands from conflicting with the names of
  10443.                       external programs.  For example, suppose you have a
  10444.                       program called LIST.COM.  Normally, the 4DOS internal
  10445.                       command will run anytime you type LIST.  But two simple
  10446.                       aliases will give you access to both the LIST.COM
  10447.                       program and the LIST command:
  10448.  
  10449.                            c:\> alias list = `c:\util\list.com`
  10450.                            c:\> alias display = `*list`
  10451.  
  10452.                       The first line above defines LIST as an alias for the
  10453.                       LIST.COM program.  If you stopped there, the external
  10454.                       program would run every time you typed LIST and you
  10455.                       would not have easy access to the internal 4DOS LIST
  10456.                       command.  The second line renames the internal LIST
  10457.                       command as DISPLAY.  The asterisk is needed in the
  10458.                       second command to tell 4DOS that the following word
  10459.                       means the internal command LIST, not the LIST alias
  10460.                       which runs your external program.
  10461.  
  10462.                       Another way to understand the asterisk is to remember
  10463.                       that when 4DOS processes a command it always checks for
  10464.                       an alias first, then looks for an internal or external
  10465.                       command, or a batch file (see page 43).  The asterisk
  10466.                       at the beginning of a command name simply tells 4DOS to
  10467.                       skip over the usual check for aliases when processing
  10468.                       that command, and go straight to checking for an
  10469.                       internal command, external command, or batch file.
  10470.  
  10471.  
  10472.  
  10473.  
  10474.           ___________________________________________________________________
  10475.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  176
  10476.  
  10477.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10478.           ___________________________________________________________________
  10479.  
  10480.  
  10481.  
  10482.                       You can also use an asterisk before a command that you
  10483.                       enter at the command line or in a batch file.  If you
  10484.                       do, 4DOS won't try to interpret that command as an
  10485.                       alias.  This can be useful when you want to be sure you
  10486.                       are running the true, original command and not an alias
  10487.                       with the same name, or temporarily defeat the purpose
  10488.                       of an alias which changes the meaning or behavior of a
  10489.                       command.  For example, above we defined an alias for
  10490.                       DIR which made directories display in 2-column paged
  10491.                       mode by default.  If you wanted to see a directory
  10492.                       display in the normal single-column, non-paged mode,
  10493.                       you could enter the command *DIR and the alias would be
  10494.                       ignored during that one command.
  10495.  
  10496.                       You can also use an asterisk in the name of an alias.
  10497.                       When you do, the characters following the asterisk are
  10498.                       optional when you invoke the alias command.  (Use of an
  10499.                       asterisk in the alias name is unrelated to the use of
  10500.                       an asterisk in the alias value discussed above.)  For
  10501.                       example, with this alias:
  10502.  
  10503.                            c:\> alias wher*eis = `dir /sp`
  10504.  
  10505.                       the new command, WHEREIS, can be invoked as WHER,
  10506.                       WHERE, WHEREI, or WHEREIS.  Now if you type:
  10507.  
  10508.                            c:\> where myfile.txt
  10509.  
  10510.                       4DOS will expand the WHEREIS alias and process the
  10511.                       command:
  10512.  
  10513.                            dir /sp myfile.txt
  10514.  
  10515.                       If you want to assign an alias to a keystroke, use the
  10516.                       keyname on the left side of the equal sign, preceded by
  10517.                       an at-sign [@].  For example, to assign the command DIR
  10518.                       /W to the F5 key, type
  10519.  
  10520.                            c:\> alias @F5 = `dir /w`
  10521.  
  10522.                       Keynames must be in the form
  10523.  
  10524.                                 [Prefix-]Keyname
  10525.  
  10526.  
  10527.  
  10528.  
  10529.  
  10530.  
  10531.           ___________________________________________________________________
  10532.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  177
  10533.  
  10534.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10535.           ___________________________________________________________________
  10536.  
  10537.  
  10538.  
  10539.                       The key prefix can be any one of the following:
  10540.  
  10541.                         No prefix  followed by F1 - F12
  10542.                         Alt        followed by A - Z, 0 - 9, F1 - F12, or
  10543.                                    Bksp
  10544.                         Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  10545.                                    Left, Right, Home, End, PgUp, PgDn, Ins,
  10546.                                    or Del
  10547.  
  10548.                       The possible key names are:
  10549.  
  10550.                         A - Z         Enter         PgDn
  10551.                         0 - 9         Up            Home
  10552.                         F1 - F12      Down          End
  10553.                         Esc           Left          Ins
  10554.                         Bksp          Right         Del
  10555.                         Tab           PgUp
  10556.  
  10557.                       All key names must be spelled as shown, and can be
  10558.                       abbreviated as long as the abbreviation is unique and
  10559.                       unambiguous.  Alphabetic keys can be specified in
  10560.                       upper-case or lower-case.  You cannot specify a
  10561.                       punctuation key.
  10562.  
  10563.                       The prefix and key name must be separated by a dash.
  10564.                       You can also define a keystroke alias by using "@" plus
  10565.                       a scan code for one of the permissible keys (see
  10566.                       Appendix B on page 334 for a list of scan codes).
  10567.  
  10568.                       Some keys are interpreted by your system's BIOS and are
  10569.                       not passed on to 4DOS (for example, Ctrl-S tells the
  10570.                       BIOS to pause screen output temporarily).  Such
  10571.                       keystrokes cannot normally be used for keystroke
  10572.                       aliases, because 4DOS never receives them.  You may not
  10573.                       be able to remap F11 and F12 if your keyboard is not
  10574.                       100% IBM-compatible, or if you have an ANSI driver
  10575.                       which does not support these keys.  This limitation is
  10576.                       due to DOS and your ANSI driver, not 4DOS.
  10577.  
  10578.                       When you define keystroke aliases, the assignments will
  10579.                       only be in effect at the 4DOS command line, not inside
  10580.                       application programs.  Be careful not to assign aliases
  10581.                       to keys that are already used at the command-line (like
  10582.                       F1 for Help).  The command-line meanings take
  10583.                       precedence and the keystroke alias will never be
  10584.                       invoked.  If you want to use one of the command-line
  10585.                       keys for an alias instead of its normal meaning, you
  10586.  
  10587.  
  10588.           ___________________________________________________________________
  10589.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  178
  10590.  
  10591.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10592.           ___________________________________________________________________
  10593.  
  10594.  
  10595.                       must first disable its regular use with the NormalKey
  10596.                       or NormalEditKey directive in your 4DOS.INI file.  See
  10597.                       page 134 for instructions.
  10598.  
  10599.                       If you define a keystroke alias like this:
  10600.  
  10601.                            c:\> alias @f5 = `dir /w`
  10602.  
  10603.                       then, when you press the F5 key, 4DOS will enter the
  10604.                       value, "dir /w" on the command line for you.  You can
  10605.                       type additional parameters if you wish and then press
  10606.                       Enter to execute the command.  With this particular
  10607.                       alias, you can define the files that you want to
  10608.                       display after pressing F5 and before pressing Enter to
  10609.                       execute the command.
  10610.  
  10611.                       If you want the keystroke alias to take action
  10612.                       automatically without waiting for you to edit the
  10613.                       command line or press Enter, you must end the value
  10614.                       with a carriage return.  To enter the carriage return
  10615.                       into your alias use the 4DOS escape character (normally
  10616.                       Ctrl-X, shown here as "^X") twice, followed by an "r."
  10617.                       For example, this command will assign an alias to the
  10618.                       F6 key that uses the CDD command to take you back to
  10619.                       the previous default directory:
  10620.  
  10621.                            c:\> alias @f6 = `cdd -^X^Xr`
  10622.  
  10623.                       If you define a keystroke alias in an ALIAS /R file and
  10624.                       you want an the alias to start automatically, use a
  10625.                       single ^X character before the "r" at the end of the
  10626.                       line.  The double ^X is only required when the alias is
  10627.                       defined on the command line or in a batch file.
  10628.  
  10629.                       If you want to see a list of all current ALIAS
  10630.                       commands, type
  10631.  
  10632.                            c:\> alias
  10633.  
  10634.                       You can also view the definition of a single alias.  If
  10635.                       you want to see the definition of the alias LIST, you
  10636.                       can type
  10637.  
  10638.                            c:\> alias list
  10639.  
  10640.                       You can save the list to a file called ALIAS.LST this
  10641.                       way:
  10642.  
  10643.  
  10644.  
  10645.           ___________________________________________________________________
  10646.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  179
  10647.  
  10648.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10649.           ___________________________________________________________________
  10650.  
  10651.  
  10652.  
  10653.                            c:\> alias > alias.lst
  10654.  
  10655.                       You can then reload all the alias definitions in the
  10656.                       file the next time you boot up with the command
  10657.  
  10658.                            c:\> alias /r alias.lst
  10659.  
  10660.                       This is much faster than defining each alias
  10661.                       individually in a batch file.  If you keep your alias
  10662.                       definitions in a separate file which you load from
  10663.                       AUTOEXEC.BAT, you can edit them with a text editor,
  10664.                       reload the edited file with the ALIAS /R command, and
  10665.                       know that the same alias list will be loaded the next
  10666.                       time you boot your computer.
  10667.  
  10668.                       When you define aliases in a file that will be read
  10669.                       with the ALIAS /R command, you should NOT use back
  10670.                       quotes around the value, even if back-quotes would
  10671.                       normally be required when defining the same alias at
  10672.                       the command line or in a batch file.
  10673.  
  10674.                       To remove an alias, use the UNALIAS command.
  10675.  
  10676.                   ##  Alias commands can use command-line arguments or
  10677.                       replaceable parameters like those in batch files.  4DOS
  10678.                       numbers the command line arguments from %1 to %127.  It
  10679.                       is up to the alias to determine the meaning of each
  10680.                       argument.  Arguments that are referred to in an alias,
  10681.                       but which are missing on the command line, appear as
  10682.                       empty strings inside the alias.
  10683.  
  10684.                       The parameter %n& has a special meaning.  4DOS
  10685.                       interprets it to mean "the entire command line, from
  10686.                       argument n to the end."  If n is not specified, it has
  10687.                       a default value of 1, so %& means "the entire command
  10688.                       line after the alias name."  The special parameter %#
  10689.                       contains the number of command line arguments.
  10690.  
  10691.                       For example, the following alias will change
  10692.                       directories, perform a command, and return to the
  10693.                       original directory:
  10694.  
  10695.                            c:\> alias in `pushd %1 ^ %2& ^ popd`
  10696.  
  10697.                       When this alias is invoked as:
  10698.  
  10699.                            c:\> in c:\comm mycomm /xmodem /2400
  10700.  
  10701.  
  10702.           ___________________________________________________________________
  10703.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  180
  10704.  
  10705.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10706.           ___________________________________________________________________
  10707.  
  10708.  
  10709.  
  10710.                       the first replaceable parameter, %1, has the value
  10711.                       "c:\comm."  %2 is "mycomm," %3 is "/xmodem," and %4 is
  10712.                       "/2400".  4DOS expands the command line into these
  10713.                       three separate commands:
  10714.  
  10715.                            pushd c:\comm
  10716.                            mycomm /xmodem /2400
  10717.                            popd
  10718.  
  10719.                   ##  This next example uses the IFF command to redefine the
  10720.                       defaults for SET only if no other options are entered
  10721.                       on the command line.  This ALIAS command should be
  10722.                       entered on one line:
  10723.  
  10724.                            c:\> alias set = `iff %#==0 then ^ *set /p ^
  10725.                                 else ^ *set %& ^ endiff`
  10726.  
  10727.                       This example modifies the SET command so that if SET is
  10728.                       entered with no arguments, it is replaced by SET /P
  10729.                       (pause after displaying each page), but if SET is
  10730.                       followed by an argument, it behaves normally.  Note the
  10731.                       use of asterisks (*set) to prevent alias loops.
  10732.  
  10733.                   ##  If an alias uses replaceable parameters, 4DOS will
  10734.                       delete command line arguments up to and including the
  10735.                       highest referenced argument.  For example, if you have
  10736.                       an alias which refers only to %1 and %4, then the first
  10737.                       and fourth arguments passed to the alias will be used,
  10738.                       the second and third arguments will be discarded, and
  10739.                       any additional arguments beyond the fourth will be
  10740.                       appended to the end of the expanded command after the
  10741.                       value portion of the alias.  If an alias uses no
  10742.                       replaceable parameters, all of the command line
  10743.                       arguments will be appended to the expanded command.
  10744.  
  10745.                   ##  Aliases also have full access to all variables in the
  10746.                       environment, 4DOS's internal variables, and 4DOS's
  10747.                       variable functions.  For example, you can create a
  10748.                       simple command-line calculator this way (enter this on
  10749.                       one line):
  10750.  
  10751.                            c:\> alias calc = `echo The answer is:
  10752.                                 %@eval[%&]`
  10753.  
  10754.                       Now, if you enter
  10755.  
  10756.                            c:\> calc 5 * 6
  10757.  
  10758.  
  10759.           ___________________________________________________________________
  10760.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  181
  10761.  
  10762.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10763.           ___________________________________________________________________
  10764.  
  10765.  
  10766.  
  10767.                       4DOS will display
  10768.  
  10769.                            The answer is: 30
  10770.  
  10771.                   ##  Aliases created in the primary shell will be inherited
  10772.                       automatically in a secondary shell.  However, an alias
  10773.                       created in a secondary shell will not be passed back to
  10774.                       a primary or parent shell.
  10775.  
  10776.           Options:    /P(ause):  This option is only effective when ALIAS is
  10777.                       used to display existing definitions.  It pauses the
  10778.                       display after each page and waits for a keystroke
  10779.                       before continuing.
  10780.  
  10781.                       /R(ead file):  This option loads an alias list from a
  10782.                       file.  The format of the file is the same as that of
  10783.                       the ALIAS display:
  10784.  
  10785.                                 name=value
  10786.  
  10787.                       where name is the name of the alias and value is its
  10788.                       value.  You can use an equal sign [=] or space to
  10789.                       separate the name and value.  Back-quotes should NOT be
  10790.                       used around the value.  You can add comments to the
  10791.                       file by starting each comment line with a colon [:].
  10792.                       You can load multiple files with one ALIAS /R command
  10793.                       by placing the names one after another on the command
  10794.                       line, separated by spaces:
  10795.  
  10796.                            c:\> alias /r alias1.lst alias2.lst
  10797.  
  10798.                       Lines in an ALIAS /R file can be up to 511 characters
  10799.                       long.
  10800.  
  10801.  
  10802.  
  10803.  
  10804.  
  10805.  
  10806.  
  10807.  
  10808.  
  10809.  
  10810.  
  10811.  
  10812.  
  10813.  
  10814.  
  10815.  
  10816.           ___________________________________________________________________
  10817.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  182
  10818.  
  10819.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ATTRIB
  10820.           ___________________________________________________________________
  10821.  
  10822.  
  10823.           ATTRIB                                                        (New)
  10824.  
  10825.           Purpose:    Change or view file and subdirectory attributes.
  10826.  
  10827.           Format:     ATTRIB [/D /Q /P /S] [+|-[AHRS]] files
  10828.  
  10829.                       files: A file, directory, or list of files or
  10830.                       directories, on which to operate.
  10831.  
  10832.                       /D(irectories)              /Q(uiet)
  10833.                       /P(ause)                    /S(ubdirectories)
  10834.  
  10835.                       Attribute flags:
  10836.  
  10837.                            +A   Set the archive attribute
  10838.                            -A   Clear the archive attribute
  10839.                            +H   Set the hidden attribute
  10840.                            -H   Clear the hidden attribute
  10841.                            +R   Set the read-only attribute
  10842.                            -R   Clear the read-only attribute
  10843.                            +S   Set the system attribute
  10844.                            -S   Clear the system attribute
  10845.  
  10846.           Usage:      Every file and subdirectory has 4 attributes that can
  10847.                       be turned on (set) or turned off (cleared): Archive,
  10848.                       Hidden, Read-only, and System.  DOS sets the Archive
  10849.                       attribute every time a file is updated or changed.
  10850.                       Backup utilities often use this attribute to find files
  10851.                       that have changed since the last general backup.  DOS
  10852.                       prevents programs from altering or erasing files that
  10853.                       have the Read-only attribute set (but applications can
  10854.                       change the attribute first and then update or erase the
  10855.                       file).  Files with Hidden and/or System attributes are
  10856.                       normally not visible in directory listings.
  10857.  
  10858.                       The ATTRIB command lets you set or clear any
  10859.                       attribute(s) for any file, group of files, or
  10860.                       subdirectory.  You can view file attributes by entering
  10861.                       ATTRIB without specifying new attributes (i.e. without
  10862.                       the [+|-[AHRS]] part of the format), or with the DIR /T
  10863.                       command.
  10864.  
  10865.                       For example, you can set the read-only and hidden
  10866.                       attributes for the file MEMO:
  10867.  
  10868.                            c:\> attrib +rh memo
  10869.  
  10870.  
  10871.  
  10872.  
  10873.           ___________________________________________________________________
  10874.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  183
  10875.  
  10876.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ATTRIB
  10877.           ___________________________________________________________________
  10878.  
  10879.  
  10880.  
  10881.                       Attribute options apply to the file(s) that follow the
  10882.                       options on the ATTRIB command line.  The example below
  10883.                       shows how to set different attributes on different
  10884.                       files with a single command.  It sets the archive
  10885.                       attribute for all .TXT files, and changes TEST.COM to
  10886.                       system and not modified:
  10887.  
  10888.                            c:\> attrib +a *.txt +s -a test.com
  10889.  
  10890.                   ##  You may know that DOS also supports "D" (subdirectory)
  10891.                       and "V" (volume label) attributes.  These attributes
  10892.                       cannot be altered with ATTRIB;  they are designed to be
  10893.                       controlled only by DOS itself.
  10894.  
  10895.           Options:    /D(irectories):  If you don't use this option, ATTRIB
  10896.                       will only modify file attributes.  If you use the /D
  10897.                       option, ATTRIB will also modify the attributes of
  10898.                       subdirectories (yes, you can have a hidden
  10899.                       subdirectory):
  10900.  
  10901.                            c:\> attrib /d +h c:\mydir
  10902.  
  10903.                       /P(ause):  Wait for a key to be pressed after each
  10904.                       screen page before continuing the display.
  10905.  
  10906.                       /Q(uiet):  This option turns off ATTRIB's normal screen
  10907.                       output.  It is most useful in batch files.
  10908.  
  10909.                       /S(ubdirectories):  If you use the /S option, the
  10910.                       ATTRIB command will be applied to all matching files in
  10911.                       the current or named directory and all of its
  10912.                       subdirectories.
  10913.  
  10914.  
  10915.  
  10916.  
  10917.  
  10918.  
  10919.  
  10920.  
  10921.  
  10922.  
  10923.  
  10924.  
  10925.  
  10926.  
  10927.  
  10928.  
  10929.  
  10930.           ___________________________________________________________________
  10931.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  184
  10932.  
  10933.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  BEEP
  10934.           ___________________________________________________________________
  10935.  
  10936.  
  10937.           BEEP                                                          (New)
  10938.  
  10939.           Purpose:    Beep the speaker or play simple music.
  10940.  
  10941.           Format:     BEEP [frequency duration ...]
  10942.  
  10943.                       frequency  is in Hertz (cycles per second).
  10944.                       duration  is in 1/18th second intervals
  10945.  
  10946.           Usage:      BEEP generates a sound through your computer's speaker.
  10947.                       It is normally used in batch files to signal that an
  10948.                       operation has been completed, or that the computer
  10949.                       needs attention.
  10950.  
  10951.                       Because BEEP allows you to specify the frequency and
  10952.                       duration of the sound, you can also use it to play
  10953.                       simple music or to create different kinds of signals
  10954.                       for the user.
  10955.  
  10956.                       You can include as many frequency and duration pairs as
  10957.                       you wish.  No sound will be generated for frequencies
  10958.                       less than 20 Hz, allowing you to insert short delays.
  10959.                       The default value for frequency is 440 Hz; the default
  10960.                       value for duration is 2.
  10961.  
  10962.                       This batch file fragment runs a program called DEMO,
  10963.                       then plays a few notes and waits for you to press a
  10964.                       key:
  10965.  
  10966.                            demo ^ beep 440 4  600 2  1040 6
  10967.                            pause Finished with the demo - hit a key...
  10968.  
  10969.                       The following table gives the frequency values for a
  10970.                       five octave range (middle C is 262 Hz):
  10971.  
  10972.                            C      131   262   523   1046  2093
  10973.                            C#/Db  139   277   554   1108  2217
  10974.                            D      147   294   587   1174  2349
  10975.                            D#/Eb  156   311   622   1244  2489
  10976.                            E      165   330   659   1318  2637
  10977.                            F      175   349   698   1397  2794
  10978.                            F#/Gb  185   370   740   1480  2960
  10979.                            G      196   392   784   1568  3136
  10980.                            G#/Ab  208   415   831   1662  3322
  10981.                            A      220   440   880   1760  3520
  10982.                            A#/Bb  233   466   932   1864  3729
  10983.                            B      248   494   988   1976  3951
  10984.  
  10985.  
  10986.  
  10987.           ___________________________________________________________________
  10988.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  185
  10989.  
  10990.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  BREAK
  10991.           ___________________________________________________________________
  10992.  
  10993.  
  10994.           BREAK                                                  (Compatible)
  10995.  
  10996.           Purpose:    Display, enable, or disable Ctrl-C and Ctrl-BREAK
  10997.                       checking.
  10998.  
  10999.           Format:     BREAK [ON | OFF]
  11000.  
  11001.           Usage:      The Ctrl-C and Ctrl-Break keys are used by many
  11002.                       programs (including 4DOS) as a signal to interrupt the
  11003.                       current operation.  BREAK controls how often DOS checks
  11004.                       to see if you've entered one of these keystrokes.
  11005.  
  11006.                       Normally, BREAK is turned off, and DOS only checks for
  11007.                       Ctrl-C and Ctrl-Break keystrokes during normal DOS
  11008.                       input or output operations involving the screen,
  11009.                       keyboard, serial port, and printer.  However many
  11010.                       programs don't use DOS for these operations, and it can
  11011.                       be difficult to interrupt them.
  11012.  
  11013.                       When BREAK is turned ON, DOS checks for Ctrl-C and
  11014.                       Ctrl-Break every time a program calls DOS.  Since most
  11015.                       programs use DOS to access files and perform other
  11016.                       functions, turning BREAK on makes it much more likely
  11017.                       that a Ctrl-C or Ctrl-Break will be noticed.  If you
  11018.                       turn BREAK on, programs will run slightly slower than
  11019.                       normal (the difference is not usually noticeable), but
  11020.                       you will be able to break out of some programs more
  11021.                       easily.
  11022.  
  11023.                       Turning BREAK on or off only affects when DOS detects
  11024.                       Ctrl-C and Ctrl-Break and notifies the program you're
  11025.                       running.  Any program can choose to ignore these
  11026.                       signals, in which case the BREAK setting won't affect
  11027.                       that program's behavior.  Also, any external program
  11028.                       can change the BREAK setting on its own.
  11029.  
  11030.                       Type BREAK by itself to display the current BREAK
  11031.                       status:
  11032.  
  11033.                            c:\> break
  11034.                            BREAK is OFF
  11035.  
  11036.                       Type BREAK plus ON or OFF to set the BREAK status:
  11037.  
  11038.                            c:\> break on
  11039.  
  11040.                       BREAK is off by default.  You can change the default by
  11041.                       adding a BREAK=ON command in your CONFIG.SYS file.
  11042.  
  11043.  
  11044.           ___________________________________________________________________
  11045.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  186
  11046.  
  11047.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CALL
  11048.           ___________________________________________________________________
  11049.  
  11050.  
  11051.           CALL                                                   (Compatible)
  11052.  
  11053.           Purpose:    Execute one batch file from within another.
  11054.  
  11055.           Format:     CALL file
  11056.  
  11057.                       file: The batch file to execute.
  11058.  
  11059.                       See also CANCEL and QUIT.
  11060.  
  11061.           Usage:      CALL allows batch files to call other batch files
  11062.                       (batch file nesting) without starting a secondary copy
  11063.                       of the command processor.  The calling batch file is
  11064.                       suspended while the called (second) batch file runs.
  11065.                       When the second batch file finishes, the original batch
  11066.                       file resumes execution at the next command.  If you
  11067.                       execute a batch file from inside another batch file
  11068.                       without using CALL, the first batch file is terminated
  11069.                       before the second one starts.
  11070.  
  11071.                       The following batch file fragment compares an input
  11072.                       line to "wp" and calls another batch file if it
  11073.                       matches:
  11074.  
  11075.                            input  Enter your choice:  %%option
  11076.                            if "%option" == "wp" call wp.bat
  11077.  
  11078.                       4DOS supports batch file nesting up to ten levels deep.
  11079.  
  11080.                       The current ECHO state will be inherited by a called
  11081.                       batch file.
  11082.  
  11083.                   ##  A called batch file will return to the calling file
  11084.                       after processing the last line in the called file, or
  11085.                       when a QUIT command is executed.  A called batch file
  11086.                       should always return in this way, or terminate all
  11087.                       batch files with CANCEL.  Restarting (or CALLing) the
  11088.                       original batch file from within a called file will
  11089.                       prevent 4DOS from detecting that you've left the second
  11090.                       file, and it may cause an infinite loop or a stack
  11091.                       overflow.
  11092.  
  11093.                   ##  You can also use CALL to invoke an alias, internal
  11094.                       command, or external command.  The command will be
  11095.                       executed just as it would be if CALL were not used.
  11096.                       You may find this useful in advanced batch files which
  11097.                       use CALL to execute other commands without "knowing"
  11098.                       the type of command being executed.
  11099.  
  11100.  
  11101.           ___________________________________________________________________
  11102.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  187
  11103.  
  11104.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CALL
  11105.           ___________________________________________________________________
  11106.  
  11107.  
  11108.  
  11109.                   ##  CALL returns an exit code which matches the batch file
  11110.                       return code.  You can test this exit code with the %_?
  11111.                       environment variable (see page 82), and use it with
  11112.                       conditional commands (&& and ||; see page 92).
  11113.  
  11114.  
  11115.  
  11116.  
  11117.  
  11118.  
  11119.  
  11120.  
  11121.  
  11122.  
  11123.  
  11124.  
  11125.  
  11126.  
  11127.  
  11128.  
  11129.  
  11130.  
  11131.  
  11132.  
  11133.  
  11134.  
  11135.  
  11136.  
  11137.  
  11138.  
  11139.  
  11140.  
  11141.  
  11142.  
  11143.  
  11144.  
  11145.  
  11146.  
  11147.  
  11148.  
  11149.  
  11150.  
  11151.  
  11152.  
  11153.  
  11154.  
  11155.  
  11156.  
  11157.  
  11158.           ___________________________________________________________________
  11159.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  188
  11160.  
  11161.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CANCEL
  11162.           ___________________________________________________________________
  11163.  
  11164.  
  11165.           CANCEL                                                        (New)
  11166.  
  11167.           Purpose:    Terminate batch file processing.
  11168.  
  11169.           Format:     CANCEL
  11170.  
  11171.                       See also: CALL and QUIT.
  11172.  
  11173.           Usage:      The CANCEL command ends all batch file processing,
  11174.                       regardless of the batch file nesting level.  Use QUIT
  11175.                       to end a nested batch file and return to the previous
  11176.                       batch file.
  11177.  
  11178.                       You can CANCEL at any point in a batch file.  If CANCEL
  11179.                       is used from within an alias it will end execution of
  11180.                       both the alias and any batch file(s) which are running
  11181.                       at the time.
  11182.  
  11183.                       The following batch file fragment compares an input
  11184.                       line to "end" and terminates all batch file processing
  11185.                       if it matches:
  11186.  
  11187.                            input Enter your choice:  %%option
  11188.                            if "%option" == "end" cancel
  11189.  
  11190.  
  11191.  
  11192.  
  11193.  
  11194.  
  11195.  
  11196.  
  11197.  
  11198.  
  11199.  
  11200.  
  11201.  
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.  
  11208.  
  11209.  
  11210.  
  11211.  
  11212.  
  11213.  
  11214.  
  11215.           ___________________________________________________________________
  11216.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  189
  11217.  
  11218.                            CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CD / CHDIR
  11219.           ___________________________________________________________________
  11220.  
  11221.  
  11222.           CD / CHDIR                                               (Enhanced)
  11223.  
  11224.           Purpose:    Display or change the current directory.
  11225.  
  11226.           Format:     CD [ path | - ]
  11227.                            or
  11228.                       CHDIR [ path | - ]
  11229.  
  11230.                       path: The directory to change to, including an optional
  11231.                       drive name.
  11232.  
  11233.                       See also: CDD, MD, PUSHD, RD, and CDPATH on page 117.
  11234.  
  11235.           Usage:      CD and CHDIR are synonyms.  You can use either one.
  11236.  
  11237.                       CD lets you navigate through the DOS subdirectory
  11238.                       structure by changing the current working directory.
  11239.                       If you enter CD and a directory name, the named
  11240.                       directory becomes the new current directory.  For
  11241.                       example, to change to the subdirectory
  11242.                       C:\FINANCE\MYFILES:
  11243.  
  11244.                            c:\> cd \finance\myfiles
  11245.                            c:\finance\myfiles>
  11246.  
  11247.                       Every disk drive on the system has its own current
  11248.                       directory.  Specifying both a drive and a directory in
  11249.                       the CD command will change the current directory on the
  11250.                       specified drive, but will not change the default drive.
  11251.                       For example, to change the default directory on drive
  11252.                       A:
  11253.  
  11254.                            c:\> cd a:\utility
  11255.                            c:\>
  11256.  
  11257.                       Notice that this command does not change to drive A:.
  11258.                       Use the CDD command to change both the drive and
  11259.                       directory together.
  11260.  
  11261.                       You can change to the parent directory with CD ..; you
  11262.                       can also go up one additional directory level with each
  11263.                       additional [.].  For example, CD .... will go up three
  11264.                       levels in the directory tree.  You can move to a
  11265.                       sibling directory -- one that branches from the same
  11266.                       parent directory as the current subdirectory -- with
  11267.                       the command CD ..\newdir.
  11268.  
  11269.  
  11270.  
  11271.  
  11272.           ___________________________________________________________________
  11273.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  190
  11274.  
  11275.                            CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CD / CHDIR
  11276.           ___________________________________________________________________
  11277.  
  11278.  
  11279.  
  11280.                       If you enter CD with no argument or with only a disk
  11281.                       drive name, it will display the current directory on
  11282.                       the default or named drive.
  11283.  
  11284.                       CD saves the current directory before changing to a new
  11285.                       directory.  You can switch back to the previous
  11286.                       directory by entering CD -.  (There must be a space
  11287.                       between the CD command and the hyphen.)  You can switch
  11288.                       back and forth between two directories by repeatedly
  11289.                       entering CD -.  The saved directory is the same for
  11290.                       both the CD and CDD commands.  Automatic directory
  11291.                       changes (see page 61) also modify the saved directory,
  11292.                       so you can use CD - to return to a directory that you
  11293.                       exited with an automatic directory change.
  11294.  
  11295.                   ##  CD never changes the default drive.  If you change
  11296.                       directories on one drive, switch to another drive, and
  11297.                       then enter CD -, the directory will be restored on the
  11298.                       first drive but the current drive will not be changed.
  11299.  
  11300.                   ##  If CD can't change to the specified directory, it will
  11301.                       look for the CDPATH environment variable.  CD will
  11302.                       append the specified directory name to each directory
  11303.                       in CDPATH and attempt to change to that directory,
  11304.                       until the first match or the end of the CDPATH
  11305.                       argument.  This lets you use CDPATH as a quick way to
  11306.                       find commonly used subdirectories which have unique
  11307.                       names.  For example, if you are currently in the
  11308.                       directory C:\WP\LETTERS\JANUARY and you'd like to
  11309.                       change to C:\FINANCE\REPORTS, you could enter the
  11310.                       command:
  11311.  
  11312.                            c:\wp\letters\january> cd \finance\reports
  11313.  
  11314.                       However if the C:\FINANCE directory is listed in your
  11315.                       CDPATH variable, and is the first directory in the list
  11316.                       with a REPORTS subdirectory, you can simply enter the
  11317.                       command:
  11318.  
  11319.                            c:\wp\letters\january> cd reports
  11320.  
  11321.                       and 4DOS will change to C:\FINANCE\REPORTS.
  11322.  
  11323.                   ##  DOS will not accept directory names longer than 64
  11324.                       characters.  You must be sure that the complete
  11325.                       directory name from the root to your deepest
  11326.                       subdirectory fits within the 64 character restriction.
  11327.  
  11328.  
  11329.           ___________________________________________________________________
  11330.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  191
  11331.  
  11332.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CDD
  11333.           ___________________________________________________________________
  11334.  
  11335.  
  11336.           CDD                                                           (New)
  11337.  
  11338.           Purpose:    Change the current disk drive and directory.
  11339.  
  11340.           Format:     CDD path
  11341.  
  11342.                       path:  The name of the directory (or drive and
  11343.                       directory) to change to.
  11344.  
  11345.                       See also: CD, MD, PUSHD, RD, and CDPATH on page 117.
  11346.  
  11347.           Usage:      CDD is similar to the CD command, except that it also
  11348.                       changes the default disk drive if one is specified.
  11349.                       CDD will change to the directory and drive you name.
  11350.                       To change from the root directory on drive A to the
  11351.                       subdirectory C:\WP:
  11352.  
  11353.                            a:\> cdd c:\wp
  11354.                            c:\wp>
  11355.  
  11356.                       You can change to the parent directory with CDD ..; you
  11357.                       can also go up one additional directory level with each
  11358.                       additional [.].  For example, CDD .... will go up three
  11359.                       levels in the directory tree.
  11360.  
  11361.                       CDD saves the current drive and directory before
  11362.                       changing to a new directory.  You can switch back to
  11363.                       the previous drive and directory by entering CDD -.
  11364.                       (There must be a space between the CDD command and the
  11365.                       hyphen.)  You can switch back and forth between two
  11366.                       drives and directories by repeatedly entering CDD -.
  11367.                       The saved directory is the same for both the CD and CDD
  11368.                       commands.  Drive changes and automatic directory
  11369.                       changes (see page 61) also modify the saved directory,
  11370.                       so you can use CD - to return to a directory that you
  11371.                       exited with a drive change or an automatic directory
  11372.                       change.
  11373.  
  11374.                   ##  If CDD can't change to the specified directory, it will
  11375.                       look for the CDPATH environment variable.  CDD will
  11376.                       append the specified directory name to each directory
  11377.                       in CDPATH and attempt to change to that drive and
  11378.                       directory, until the first match or the end of the
  11379.                       CDPATH argument.  This allows you to use CDPATH as a
  11380.                       quick way to find commonly used subdirectories which
  11381.                       have unique names.  For example, if you are currently
  11382.                       in the directory C:\WP\LETTERS\JANUARY and you'd like
  11383.  
  11384.  
  11385.  
  11386.           ___________________________________________________________________
  11387.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  192
  11388.  
  11389.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CDD
  11390.           ___________________________________________________________________
  11391.  
  11392.  
  11393.                       to change to D:\SOFTWARE\UTIL, you could enter the
  11394.                       command:
  11395.  
  11396.                            c:\wp\letters\january> cdd d:\software\util
  11397.  
  11398.                       However if the D:\SOFTWARE directory is listed in your
  11399.                       CDPATH variable, and is the first directory in the list
  11400.                       with a UTIL subdirectory, you can simply enter the
  11401.                       command:
  11402.  
  11403.                            c:\wp\letters\january> cdd util
  11404.  
  11405.                       and 4DOS will change to D:\SOFTWARE\UTIL.
  11406.  
  11407.                   ##  DOS will not accept directory names longer than 64
  11408.                       characters.  You must be sure that the complete
  11409.                       directory name from the root to your deepest
  11410.                       subdirectory fits within the 64 character restriction.
  11411.  
  11412.  
  11413.  
  11414.  
  11415.  
  11416.  
  11417.  
  11418.  
  11419.  
  11420.  
  11421.  
  11422.  
  11423.  
  11424.  
  11425.  
  11426.  
  11427.  
  11428.  
  11429.  
  11430.  
  11431.  
  11432.  
  11433.  
  11434.  
  11435.  
  11436.  
  11437.  
  11438.  
  11439.  
  11440.  
  11441.  
  11442.  
  11443.           ___________________________________________________________________
  11444.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  193
  11445.  
  11446.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CHCP
  11447.           ___________________________________________________________________
  11448.  
  11449.  
  11450.           CHCP                                                   (Compatible)
  11451.  
  11452.           Purpose:    Display or change the current system code page.
  11453.  
  11454.           Format:     CHCP [n]
  11455.  
  11456.                       n: A system code page number.
  11457.  
  11458.           ## Usage:   Code page switching allows you to select different
  11459.                       character sets for language support.  To use code page
  11460.                       switching, you must have an EGA or VGA display and MS-
  11461.                       DOS or PC-DOS 3.3 or above.
  11462.  
  11463.                       If you enter CHCP without a number, the current code
  11464.                       page is displayed.
  11465.  
  11466.                            c:\> chcp
  11467.                            Active code page: 437
  11468.  
  11469.                       If you enter CHCP plus a code page number, the system
  11470.                       code page is changed.  For example, to set the code
  11471.                       page to multilingual:
  11472.  
  11473.                            c:\> chcp 850
  11474.  
  11475.                       Before using CHCP, you must first load the device
  11476.                       drivers (in CONFIG.SYS); make sure the information file
  11477.                       (COUNTRY.SYS) is available; load national language
  11478.                       support (using the NLSFUNC command); and prepare the
  11479.                       specified code page for the devices (using the MODE
  11480.                       command with the CODEPAGE PREPARE option).
  11481.  
  11482.                       CHCP accepts one of the two prepared system code pages.
  11483.                       An error message is displayed if a code page is
  11484.                       selected that has not been prepared for the system.
  11485.  
  11486.                       See your DOS manual for more information on CHCP.
  11487.  
  11488.  
  11489.  
  11490.  
  11491.  
  11492.  
  11493.  
  11494.  
  11495.  
  11496.  
  11497.  
  11498.  
  11499.  
  11500.           ___________________________________________________________________
  11501.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  194
  11502.  
  11503.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CLS
  11504.           ___________________________________________________________________
  11505.  
  11506.  
  11507.           CLS                                                      (Enhanced)
  11508.  
  11509.           Purpose:    Clear the video display and move the cursor to the
  11510.                       upper left corner;  optionally change the default
  11511.                       display and border colors.
  11512.  
  11513.           Format:     CLS [[BRIght] [BLInk] fg ON bg] [BORder bc]
  11514.  
  11515.                       fg:  The new foreground color
  11516.                       bg:  The new background color
  11517.                       bc:  The new border color
  11518.  
  11519.                       The available colors are:
  11520.  
  11521.                         Black         Blue          Green         Red
  11522.                         Magenta       Cyan          Yellow        White
  11523.  
  11524.                       See also: COLOR.
  11525.  
  11526.           Usage:      CLS can be used to clear the screen without changing
  11527.                       colors, or to clear the screen and change the screen
  11528.                       colors simultaneously.  These three examples show how
  11529.                       to clear the screen to the default colors, to bright
  11530.                       white letters on a blue background, and to bright
  11531.                       yellow letters on a magenta background with a blue
  11532.                       border:
  11533.  
  11534.                            c:\> cls
  11535.                            c:\> cls bright white on blue
  11536.                            c:\> cls bri yel on mag bor blu
  11537.  
  11538.                       As shown in the last example, color names plus the
  11539.                       words BRIGHT, BLINK, and BORDER may be shortened to the
  11540.                       first 3 letters.
  11541.  
  11542.                       If you use BRIGHT and/or BLINK, 4DOS will apply the
  11543.                       appropriate attribute to the foreground characters (PC
  11544.                       displays do not allow a bright or blinking background).
  11545.  
  11546.                       CLS is often used in batch files to clear the screen
  11547.                       before displaying text.
  11548.  
  11549.                   ##  If ANSI.SYS or a compatible driver is not loaded, the
  11550.                       colors will not be "sticky" -- you may lose them after
  11551.                       you run an application.  If 4DOS thinks you have an
  11552.                       ANSI driver loaded, it first tries an ANSI clear
  11553.                       screen.  If that doesn't work, 4DOS will call the BIOS
  11554.                       to clear the screen.  You can force 4DOS to recognize
  11555.  
  11556.  
  11557.           ___________________________________________________________________
  11558.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  195
  11559.  
  11560.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CLS
  11561.           ___________________________________________________________________
  11562.  
  11563.  
  11564.                       the ANSI state with the SETDOS /A option (see page 301)
  11565.                       or the ANSI directive in 4DOS.INI (see page 129).
  11566.  
  11567.                       If your display accommodates more than 25 rows by 80
  11568.                       columns and CLS doesn't clear the whole screen, your
  11569.                       ANSI driver probably does not support the large display
  11570.                       size properly.
  11571.  
  11572.  
  11573.  
  11574.  
  11575.  
  11576.  
  11577.  
  11578.  
  11579.  
  11580.  
  11581.  
  11582.  
  11583.  
  11584.  
  11585.  
  11586.  
  11587.  
  11588.  
  11589.  
  11590.  
  11591.  
  11592.  
  11593.  
  11594.  
  11595.  
  11596.  
  11597.  
  11598.  
  11599.  
  11600.  
  11601.  
  11602.  
  11603.  
  11604.  
  11605.  
  11606.  
  11607.  
  11608.  
  11609.  
  11610.  
  11611.  
  11612.  
  11613.  
  11614.           ___________________________________________________________________
  11615.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  196
  11616.  
  11617.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COLOR
  11618.           ___________________________________________________________________
  11619.  
  11620.  
  11621.           COLOR                                                         (New)
  11622.  
  11623.           Purpose:    Change the default display colors.
  11624.  
  11625.           Format:     COLOR [BRIght] [BLInk] fg ON bg [BORder bc]
  11626.  
  11627.                       fg:  The new foreground color
  11628.                       bg:  The new background color
  11629.                       bc:  The new border color
  11630.  
  11631.                       The available colors are:
  11632.  
  11633.                         Black         Blue          Green         Red
  11634.                         Magenta       Cyan          Yellow        White
  11635.  
  11636.                       See also: CLS.
  11637.  
  11638.           Usage:      COLOR is normally used in batch files before displaying
  11639.                       text.  To set screen colors to bright white on blue,
  11640.                       you can use either of these commands:
  11641.  
  11642.                            c:\> color bright white on blue
  11643.                            c:\> color bri whi on blu
  11644.  
  11645.                       As the examples show, you may shorten color names plus
  11646.                       the words BRIGHT, BLINK, and BORDER to the first 3
  11647.                       letters.
  11648.  
  11649.                       If you have an ANSI driver (such as ANSI.SYS)
  11650.                       installed, COLOR will not change anything on the
  11651.                       screen.  It will only set the default colors for
  11652.                       subsequent screen displays.
  11653.  
  11654.                       If you are not using an ANSI driver, COLOR will change
  11655.                       the display colors of every character on the screen.
  11656.                       However, the colors will not be "sticky" -- you may
  11657.                       lose them after you run an application.
  11658.  
  11659.                   ##  If you see odd characters like "[44;37m" when you try
  11660.                       to set the screen colors, 4DOS probably thinks you have
  11661.                       an ANSI driver loaded when you don't.  Use SETDOS /A2,
  11662.                       or ANSI = No in 4DOS.INI, to tell 4DOS you have no ANSI
  11663.                       driver.
  11664.  
  11665.  
  11666.  
  11667.  
  11668.  
  11669.  
  11670.  
  11671.           ___________________________________________________________________
  11672.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  197
  11673.  
  11674.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11675.           ___________________________________________________________________
  11676.  
  11677.  
  11678.           COPY                                                     (Enhanced)
  11679.  
  11680.           Purpose:    Copy data between disks, directories, files, or
  11681.                       physical hardware devices (such as your printer or
  11682.                       serial port).
  11683.  
  11684.           Format:     COPY [/C /H /M /N/ /P /Q /S /R /U /V] source[+] ...
  11685.                            [/A /B] destination [/A /B]
  11686.  
  11687.                       source: A file or list of files or a device to copy
  11688.                       from.
  11689.                       destination: A file, directory, or device to copy to.
  11690.  
  11691.                       /A(SCII)                    /P(rompt)
  11692.                       /B(inary)                   /Q(uiet)
  11693.                       /C(hanged)                  /R(eplace)
  11694.                       /H(idden)                   /S(ubdirectories)
  11695.                       /M(odified)                 /U(pdate)
  11696.                       /N(othing)                  /V(erify)
  11697.  
  11698.                       See also: ATTRIB, MOVE, and REN.
  11699.  
  11700.           Usage:      The 4DOS COPY command accepts all traditional syntax
  11701.                       and options and adds several new features.
  11702.  
  11703.                       The simplest use of COPY is to make a copy of a file,
  11704.                       like this example which makes a copy of a file called
  11705.                       file1.abc:
  11706.  
  11707.                            c:\> copy file1.abc file2.def
  11708.  
  11709.                       You can also copy a file to another drive and/or
  11710.                       directory.  The following command copies file1 to the
  11711.                       \MYDIR directory on drive E:
  11712.  
  11713.                            c:\> copy file1 e:\mydir
  11714.  
  11715.                       You can copy several files at once by using wildcards:
  11716.  
  11717.                            c:\> copy *.txt e:\mydir
  11718.  
  11719.                       (See page 71 for an explanation of how 4DOS interprets
  11720.                       the wildcard characters [*] and [?].)
  11721.  
  11722.                       4DOS also lets you copy several files at one time.  The
  11723.                       following command copies 3 files from the current
  11724.                       directory to the \MYDIR directory on drive E:
  11725.  
  11726.  
  11727.  
  11728.           ___________________________________________________________________
  11729.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  198
  11730.  
  11731.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11732.           ___________________________________________________________________
  11733.  
  11734.  
  11735.  
  11736.                            c:\> copy file1 file2 file3 e:\mydir
  11737.  
  11738.                       The way COPY interprets your command line depends on
  11739.                       how many arguments (file, directory, or device names)
  11740.                       are on the line, and whether the arguments are
  11741.                       separated with [+] signs or spaces.
  11742.  
  11743.                       If there is only one argument on the line, COPY assumes
  11744.                       it is the source, and uses the current drive and
  11745.                       directory as the destination.  For example, the
  11746.                       following command copies all the .DAT files on drive A
  11747.                       to the current directory on drive C:
  11748.  
  11749.                            c:\> copy a:*.dat
  11750.  
  11751.                       If there are two or more arguments on the line and [+]
  11752.                       signs are not used, then COPY assumes that the last
  11753.                       argument is the destination and copies all source files
  11754.                       to this new location.  If the destination is a drive,
  11755.                       directory, or device name then the source files are
  11756.                       copied individually to the new location.  If the
  11757.                       destination is a file name, the first source file is
  11758.                       copied to the destination, and any additional source
  11759.                       files are then appended to the new destination file.
  11760.  
  11761.                       For example, the first of these commands copies the
  11762.                       .DAT files from the current directory on drive A
  11763.                       individually to C:\MYDIR (which must already exist as a
  11764.                       directory);  the second appends all the .DAT files
  11765.                       together into one large file called C:\DATA (assuming
  11766.                       C:\DATA is not a directory):
  11767.  
  11768.                            c:>\ copy a:*.dat c:\mydir\
  11769.                            c:>\ copy a:*.dat c:\data
  11770.  
  11771.                       When you copy to a directory, if you add a backslash
  11772.                       [\] to the end of the name as shown in the first
  11773.                       example above, COPY will display an error message if
  11774.                       the name does not refer to an existing directory.  You
  11775.                       can use this feature to keep COPY from treating a
  11776.                       mistyped destination directory name as a file name and
  11777.                       attempting to append all your source files to a
  11778.                       destination file, when you really meant to copy them
  11779.                       individually to a destination directory.
  11780.  
  11781.                   ##  A plus [+] tells COPY to append two or more files to a
  11782.                       single destination file.  If you list several source
  11783.  
  11784.  
  11785.           ___________________________________________________________________
  11786.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  199
  11787.  
  11788.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11789.           ___________________________________________________________________
  11790.  
  11791.  
  11792.                       files separated with [+] and don't specify a
  11793.                       destination, COPY will use the name of the first source
  11794.                       file as the destination, and append each subsequent
  11795.                       file to the first file.  In this case the destination
  11796.                       file will always be created in the current directory,
  11797.                       even if the first source file is in another directory
  11798.                       or on another drive.  For example, the following
  11799.                       command will append the contents of MEMO2 and MEMO3 to
  11800.                       MEMO1 and leave the combined contents in the file
  11801.                       MEMO1:
  11802.  
  11803.                            c:\> copy memo1+memo2+memo3
  11804.  
  11805.                       TO append MEMO2 and MEMO3 from C:\ to D:\MEMO1, and
  11806.                       leave the result in C:\MEMO1:
  11807.  
  11808.                            c:\> copy d:memo1+memo2+memo3
  11809.  
  11810.                       To append the same three files but store the result in
  11811.                       BIGMEMO:
  11812.  
  11813.                            c:\> copy memo1+memo2+memo3 bigmemo
  11814.  
  11815.                   ##  You cannot append files to a device (such as a
  11816.                       printer);  if you try to do so, COPY will ignore the
  11817.                       [+] signs and copy the files individually.  If you
  11818.                       attempt to append several source files to a destination
  11819.                       directory or disk, COPY will append the files and place
  11820.                       the copy in the new location with the same name as the
  11821.                       first source file.
  11822.  
  11823.                   ##  If your destination has wildcards in it, COPY will
  11824.                       attempt to match them with the source names.  For
  11825.                       example, this command copies the .DAT files from drive
  11826.                       A to C:\MYDIR and gives the new copies the extension
  11827.                       .DX:
  11828.  
  11829.                            c:\> copy a:*.dat c:\mydir\*.dx
  11830.  
  11831.                       This feature can give you unexpected results if you use
  11832.                       it with multiple source file names.  For example,
  11833.                       suppose that drive A contains XYZ.DAT and XYZ.TXT.  The
  11834.                       command
  11835.  
  11836.                            c:\> copy a:\*.dat a:\*.txt c:\mydir\*.dx
  11837.  
  11838.  
  11839.  
  11840.  
  11841.  
  11842.           ___________________________________________________________________
  11843.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  200
  11844.  
  11845.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11846.           ___________________________________________________________________
  11847.  
  11848.  
  11849.  
  11850.                       will copy A:XYZ.DAT to C:\MYDIR\XYZ.DX.  Then it will
  11851.                       copy A:XYZ.TXT to C:\MYDIR\XYZ.DX, overwriting the
  11852.                       first file it copied.
  11853.  
  11854.                   ##  COPY also understands include lists (see page 75), so
  11855.                       you can specify several different kinds of files in the
  11856.                       same command.  This command copies the .TXT, .DOC, and
  11857.                       .BAT files from the E:\MYDIR directory to the root
  11858.                       directory of drive A:
  11859.  
  11860.                            c:\> copy e:\mydir\*.txt;*.doc;*.bat a:\
  11861.  
  11862.                   ##  COPY does not change a file's attributes.  The
  11863.                       destination file will have the same attributes as the
  11864.                       source file.
  11865.  
  11866.                   ##  If you are using 4DOS in an OS/2 DOS session, COPY will
  11867.                       copy OS/2 extended attributes from the source to the
  11868.                       destination, provided the the file system on the
  11869.                       destination drive supports them.  You can disable this
  11870.                       feature with the CopyEA = No directive in 4DOS.INI (see
  11871.                       page 138).
  11872.  
  11873.           Options:    The /A(SCII) and /B(inary) options apply to the
  11874.                       preceding filename and to all subsequent filenames on
  11875.                       the command line until another /A or /B is entered.
  11876.                       The other options (/C, /H, /M, /N, /P, /Q, /R, /S, /U,
  11877.                       /V) apply to all filenames on the command line, no
  11878.                       matter where you put them.  For example, either of the
  11879.                       following commands could be used to copy a font file to
  11880.                       the printer in binary mode:
  11881.  
  11882.                            c:\> copy /b myfont.dat prn
  11883.                            c:\> copy myfont.dat /b prn
  11884.  
  11885.                       Some options do not make sense in certain contexts, in
  11886.                       which case COPY will ignore them.  For example, you
  11887.                       cannot prompt before replacing an existing file when
  11888.                       the destination is a device such as the printer --
  11889.                       there's no such thing as an "existing file" on the
  11890.                       printer.  If you use conflicting output options, like
  11891.                       /Q and /P, 4DOS will take a "conservative" approach and
  11892.                       give priority to the option which generates more
  11893.                       prompts or more information.
  11894.  
  11895.                       Options used in less common situations have been marked
  11896.                       with ## below.  Remember that the options are in
  11897.  
  11898.  
  11899.           ___________________________________________________________________
  11900.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  201
  11901.  
  11902.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11903.           ___________________________________________________________________
  11904.  
  11905.  
  11906.                       alphabetical order, so more basic options are
  11907.                       interspersed with those marked with## .
  11908.  
  11909.                   ##  /A(SCII):  If you use /A with a source filename, 4DOS
  11910.                       will copy the file up to, but not including, the first
  11911.                       Ctrl-Z (Control-Z or ASCII 26) character in the file.
  11912.                       If you use /A with a destination filename, 4DOS will
  11913.                       add a Ctrl-Z to the end of the file (some application
  11914.                       programs use the Ctrl-Z to mark the end of a file).
  11915.                       4DOS defaults to /A when appending files.
  11916.  
  11917.                   ##  /B(inary):  If you use /B with a source filename, 4DOS
  11918.                       will copy the entire file.  Using /B with a destination
  11919.                       filename prevents 4DOS from adding a Ctrl-Z to the end
  11920.                       of the destination file.  4DOS defaults to /B for
  11921.                       normal file copies.
  11922.  
  11923.                       /C(hanged files):  Copy files only if the destination
  11924.                       file exists and is older than the source (see also /U).
  11925.                       This option is useful for updating the files in one
  11926.                       directory from those in another without copying any
  11927.                       newly created files.
  11928.  
  11929.                   ##  /H(idden):  Copy all matching files including those
  11930.                       with the hidden and/or system attribute set (see
  11931.                       ATTRIB).
  11932.  
  11933.                       /M(odified):  Copy only those files with the archive
  11934.                       bit set (see ATTRIB), i.e. those which have been
  11935.                       modified since the last backup.  The archive bit will
  11936.                       NOT be cleared after copying.
  11937.  
  11938.                   ##  /N(othing):  Do everything except actually perform the
  11939.                       copy.  This option is most useful for testing what the
  11940.                       result of a complex COPY command will be.
  11941.  
  11942.                       /P(rompt):  Ask the user to confirm each source file by
  11943.                       pressing Y or N.  An N response will skip that
  11944.                       particular file and continue with the rest of the
  11945.                       command.
  11946.  
  11947.                       /Q(uiet):  Turn off the display of the files copied.
  11948.                       This option is most often used in batch files.
  11949.  
  11950.                       /R(eplace):  Prompt the user before overwriting an
  11951.                       existing file.
  11952.  
  11953.  
  11954.  
  11955.  
  11956.           ___________________________________________________________________
  11957.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  202
  11958.  
  11959.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11960.           ___________________________________________________________________
  11961.  
  11962.  
  11963.  
  11964.                       /S(ubdirectories):  Copy the subdirectory tree starting
  11965.                       with the files in the source directory plus each
  11966.                       subdirectory below that.  The destination must be a
  11967.                       directory;  if it doesn't exist, COPY will attempt to
  11968.                       create it.  COPY will also attempt to create needed
  11969.                       subdirectories on the tree below the destination,
  11970.                       including empty source directories.
  11971.  
  11972.                       /U(pdate):  Copy each source file only if it is newer
  11973.                       than a matching destination file or if a matching
  11974.                       destination file does not exist (see also /C).  This
  11975.                       option is useful for keeping one directory matched with
  11976.                       another with a minimum of copying.
  11977.  
  11978.                   ##  /V(erify):  Verify each disk write.  This is the same
  11979.                       as executing the VERIFY ON command, but is only active
  11980.                       during the COPY.  /V does not read back the file and
  11981.                       compare its contents with what was written;  it only
  11982.                       verifies that the data written to disk is physically
  11983.                       readable.
  11984.  
  11985.  
  11986.  
  11987.  
  11988.  
  11989.  
  11990.  
  11991.  
  11992.  
  11993.  
  11994.  
  11995.  
  11996.  
  11997.  
  11998.  
  11999.  
  12000.  
  12001.  
  12002.  
  12003.  
  12004.  
  12005.  
  12006.  
  12007.  
  12008.  
  12009.  
  12010.  
  12011.  
  12012.  
  12013.           ___________________________________________________________________
  12014.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  203
  12015.  
  12016.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CTTY
  12017.           ___________________________________________________________________
  12018.  
  12019.  
  12020.           CTTY                                                   (Compatible)
  12021.  
  12022.           Purpose:    Change the default console device.
  12023.  
  12024.           Format:     CTTY device
  12025.  
  12026.                       device:  The new console device.
  12027.  
  12028.           ## Usage:   Normally, 4DOS uses the keyboard as the standard input
  12029.                       device and the display as the standard output device.
  12030.                       Together, the keyboard and display are known as the
  12031.                       console or CON.  The CTTY command allows you to
  12032.                       substitute another device that can perform standard
  12033.                       character I/O for the console.
  12034.  
  12035.                       For example to change the console to the first serial
  12036.                       port:
  12037.  
  12038.                            c:\> ctty com1
  12039.  
  12040.                       Change the console back to the standard keyboard and
  12041.                       display:
  12042.  
  12043.                            c:\> ctty con
  12044.  
  12045.                       CTTY works only for programs and commands that use
  12046.                       standard DOS input and output functions.  This includes
  12047.                       all 4DOS internal commands except DRAWBOX, DRAWHLINE,
  12048.                       DRAWVLINE, LIST, SCREEN, SCRPUT, SELECT, and VSCRPUT.
  12049.  
  12050.  
  12051.  
  12052.  
  12053.  
  12054.  
  12055.  
  12056.  
  12057.  
  12058.  
  12059.  
  12060.  
  12061.  
  12062.  
  12063.  
  12064.  
  12065.  
  12066.  
  12067.  
  12068.  
  12069.  
  12070.           ___________________________________________________________________
  12071.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  204
  12072.  
  12073.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DATE
  12074.           ___________________________________________________________________
  12075.  
  12076.  
  12077.           DATE                                                   (Compatible)
  12078.  
  12079.           Purpose:    Display and optionally change the system date.
  12080.  
  12081.           Format:     DATE [mm-dd-yy]
  12082.  
  12083.                       mm:  The month (01 - 12)
  12084.                       dd:  The day  (01 - 31)
  12085.                       yy:  The year (80 - 199 = 1980 to 2099)
  12086.  
  12087.                       See also: TIME.
  12088.  
  12089.           Usage:      If you simply type DATE without any parameters, 4DOS
  12090.                       will display the current system date and time, and
  12091.                       prompt you for a new date.  Press ENTER if you don't
  12092.                       wish to change the date.  If you type a new date, it
  12093.                       will become the current system date, which is included
  12094.                       in the directory entry of each file as it is created or
  12095.                       altered:
  12096.  
  12097.                            c:\> date
  12098.                            Mon  Sep 16, 1991  9:30:06
  12099.                            Enter new date (mm-dd-yy):
  12100.  
  12101.                       You can also enter a new system date by typing the DATE
  12102.                       command plus the new date on the command line:
  12103.  
  12104.                            c:\> date 9/16/91
  12105.  
  12106.                       You can use hyphens, slashes, or periods to separate
  12107.                       the month, day, and year entries.  A full 4-digit year
  12108.                       can be entered if you wish.
  12109.  
  12110.                       The format for the date entry depends on the country
  12111.                       code defined in the CONFIG.SYS file or by the CHCP
  12112.                       command.  The default format is U.S. (mm-dd-yy).  The
  12113.                       European format is dd-mm-yy; the Japanese is yy-mm-dd.
  12114.  
  12115.  
  12116.  
  12117.  
  12118.  
  12119.  
  12120.  
  12121.  
  12122.  
  12123.  
  12124.  
  12125.  
  12126.  
  12127.           ___________________________________________________________________
  12128.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  205
  12129.  
  12130.                           CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DEL / ERASE
  12131.           ___________________________________________________________________
  12132.  
  12133.  
  12134.           DEL / ERASE                                              (Enhanced)
  12135.  
  12136.           Purpose:    Erase one file, a group of files, or entire
  12137.                       subdirectories.
  12138.  
  12139.           Format:     DEL [/N /P /Q /S /X /Y /Z] file...
  12140.                            or
  12141.                       ERASE [/N /P /Q /S /X /Y /Z] file...
  12142.  
  12143.                       file:  The file, subdirectory, or list of files or
  12144.                       subdirectories to erase.
  12145.  
  12146.                       /N(othing)          /X (remove empty subdirectories)
  12147.                       /P(rompt)           /Y(es to all prompts)
  12148.                       /Q(uiet)            /Z(ap hidden and read-only files)
  12149.                       /S(ubdirectories)
  12150.  
  12151.           Usage:      DEL and ERASE are synonyms, you can use either one.
  12152.  
  12153.                       Use the DEL and ERASE commands with caution; the files
  12154.                       and subdirectories that you erase may be impossible to
  12155.                       recover without specialized utilities and a lot of
  12156.                       work.
  12157.  
  12158.                       To erase a single file, simply enter the file name:
  12159.  
  12160.                            c:\> del letters.txt
  12161.  
  12162.                       Like all 4DOS file processing commands, DEL accepts
  12163.                       multiple file names, wildcards (see page 71), and
  12164.                       include lists (see page 75).  For example, to erase all
  12165.                       the files in the current directory with a .BAK or .PRN
  12166.                       extension:
  12167.  
  12168.                            c:\> del *.bak *.prn
  12169.  
  12170.                       If you enter a subdirectory name, or a filename
  12171.                       composed only of wildcards (* and/or ?), DEL asks for
  12172.                       confirmation (Y or N) unless you specified the /Y
  12173.                       option.  If you respond with a Y, DEL will delete all
  12174.                       the files in that subdirectory (except hidden, system,
  12175.                       and read-only files, unless you have used the /Z
  12176.                       option).
  12177.  
  12178.                   ##  DEL returns a non-zero exit code if no files are
  12179.                       deleted.  You can test this exit code with the %_?
  12180.                       environment variable (see page 82), and use it with
  12181.                       conditional commands (&& and ||; see page 92).
  12182.  
  12183.  
  12184.           ___________________________________________________________________
  12185.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  206
  12186.  
  12187.                           CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DEL / ERASE
  12188.           ___________________________________________________________________
  12189.  
  12190.  
  12191.  
  12192.           Options:##  /N(othing):  Do everything except actually delete the
  12193.                       file(s).  This is useful for testing what the result of
  12194.                       a DEL would be.
  12195.  
  12196.                       /P(rompt):  Ask the user to confirm each erasure by
  12197.                       pressing Y or N.  An N response will skip that
  12198.                       particular erasure.
  12199.  
  12200.                       /Q(uiet):  Don't display filenames as they are deleted.
  12201.                       DEL will run fastest if you specify the /Q option and
  12202.                       the filename doesn't use the extended 4DOS wildcards.
  12203.  
  12204.                       /S(ubdirectories):  Delete the specified files in this
  12205.                       directory and all of its subdirectories.  This is like
  12206.                       a GLOBAL DEL, and can be used to delete all the files
  12207.                       in a subdirectory tree or even a whole disk.  It should
  12208.                       be used with caution!
  12209.  
  12210.                   ##  /X (remove empty subdirectories):  Remove empty
  12211.                       subdirectories after deleting (only useful when used
  12212.                       with /S).
  12213.  
  12214.                  ! ## /Y(es):  The reverse of /P -- it assumes a Y response
  12215.                       to everything, including deleting an entire
  12216.                       subdirectory tree.  4DOS normally prompts before
  12217.                       deleting files when the name consists only of wildcards
  12218.                       or a subdirectory name (see above); /Y overrides this
  12219.                       protection, and should be used with extreme caution!
  12220.  
  12221.                  ! ## /Z(ap):  Delete read-only, hidden, and system files as
  12222.                       well as normal files.  Files with the read-only,
  12223.                       hidden, or system attribute set are normally protected
  12224.                       from deletion; /Z overrides this protection, and should
  12225.                       be used with extreme caution.  Because EXCEPT works by
  12226.                       hiding files, /Z will override an EXCEPT command.
  12227.  
  12228.                       For example, to delete the entire subdirectory tree
  12229.                       starting with C:\UTIL, including hidden and read-only
  12230.                       files, without prompting (use this command with
  12231.                       CAUTION!):
  12232.  
  12233.                            c:\> del /s/x/y/z c:\util\
  12234.  
  12235.  
  12236.  
  12237.  
  12238.  
  12239.  
  12240.  
  12241.           ___________________________________________________________________
  12242.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  207
  12243.  
  12244.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DELAY
  12245.           ___________________________________________________________________
  12246.  
  12247.  
  12248.           DELAY                                                         (New)
  12249.  
  12250.           Purpose:    Pause for a specified length of time.
  12251.  
  12252.           Format:     DELAY [seconds]
  12253.  
  12254.                       seconds: the number of seconds to delay.
  12255.  
  12256.           Usage:      DELAY is useful in batch file loops while waiting for
  12257.                       something to occur.  To wait for 10 seconds:
  12258.  
  12259.                            delay 10
  12260.  
  12261.                       A simple loop could make a tone with the BEEP command
  12262.                       to get the operator's attention and then DELAY for 60
  12263.                       seconds while it waits for the user to respond.
  12264.  
  12265.                   ##  For delays shorter than one second, use the BEEP
  12266.                       command with an inaudible frequency (below 20 Hz).
  12267.  
  12268.                       You can cancel a delay by pressing Ctrl-C or Ctrl-
  12269.                       Break.
  12270.  
  12271.  
  12272.  
  12273.  
  12274.  
  12275.  
  12276.  
  12277.  
  12278.  
  12279.  
  12280.  
  12281.  
  12282.  
  12283.  
  12284.  
  12285.  
  12286.  
  12287.  
  12288.  
  12289.  
  12290.  
  12291.  
  12292.  
  12293.  
  12294.  
  12295.  
  12296.  
  12297.  
  12298.           ___________________________________________________________________
  12299.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  208
  12300.  
  12301.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DESCRIBE
  12302.           ___________________________________________________________________
  12303.  
  12304.  
  12305.           DESCRIBE                                                      (New)
  12306.  
  12307.           Purpose:    Create, modify, or delete file and subdirectory
  12308.                       descriptions.
  12309.  
  12310.           Format:     DESCRIBE file ["description"] ...
  12311.  
  12312.                       file:  The file or files to operate on.
  12313.                       "description":  The description to attach to the file.
  12314.  
  12315.           Usage:      DESCRIBE adds descriptions to DOS files and
  12316.                       subdirectories.  The descriptions are displayed by DIR
  12317.                       in single-column mode and by SELECT.  Descriptions let
  12318.                       you identify your files in much more meaningful ways
  12319.                       than DOS allows in an eight-character filename.
  12320.  
  12321.                       You enter a description on the command line by typing
  12322.                       the DESCRIBE command, the filename, and the description
  12323.                       in quotation marks, like this:
  12324.  
  12325.                            c:\> describe memo.txt "Memo to Bob about party"
  12326.  
  12327.                       If you don't put a description on the command line,
  12328.                       DESCRIBE will prompt you for it:
  12329.  
  12330.                            c:\> describe memo.txt
  12331.                            Describe "memo.txt" : Memo to Bob about party
  12332.  
  12333.                       If you use wildcards or multiple filenames with the
  12334.                       DESCRIBE command and don't include the description
  12335.                       text, you will be prompted to enter a description for
  12336.                       each file.  If you do include the description on the
  12337.                       command line, all matching files will be given the same
  12338.                       description.
  12339.  
  12340.                       Each description can be up to 40 characters long.  You
  12341.                       can change this limit with the DescriptionMax directive
  12342.                       in 4DOS.INI (see page 209).  DESCRIBE can edit
  12343.                       descriptions longer than DescriptionMax (up to a limit
  12344.                       of 120 characters), but will not allow you to lengthen
  12345.                       the existing text.
  12346.  
  12347.                       4DOS stores the descriptions in each directory in a
  12348.                       hidden file called DESCRIPT.ION.  Use the ATTRIB
  12349.                       command to "unhide" this file if you need to copy or
  12350.                       delete it.
  12351.  
  12352.  
  12353.  
  12354.  
  12355.           ___________________________________________________________________
  12356.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  209
  12357.  
  12358.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DESCRIBE
  12359.           ___________________________________________________________________
  12360.  
  12361.  
  12362.  
  12363.                       The description file is modified appropriately whenever
  12364.                       you perform an internal command which affects it (such
  12365.                       as COPY, MOVE, DEL, or RENAME), but not if you use an
  12366.                       external program (such as XCOPY) or a visual shell.
  12367.  
  12368.  
  12369.  
  12370.  
  12371.  
  12372.  
  12373.  
  12374.  
  12375.  
  12376.  
  12377.  
  12378.  
  12379.  
  12380.  
  12381.  
  12382.  
  12383.  
  12384.  
  12385.  
  12386.  
  12387.  
  12388.  
  12389.  
  12390.  
  12391.  
  12392.  
  12393.  
  12394.  
  12395.  
  12396.  
  12397.  
  12398.  
  12399.  
  12400.  
  12401.  
  12402.  
  12403.  
  12404.  
  12405.  
  12406.  
  12407.  
  12408.  
  12409.  
  12410.  
  12411.  
  12412.           ___________________________________________________________________
  12413.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  210
  12414.  
  12415.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12416.           ___________________________________________________________________
  12417.  
  12418.  
  12419.           DIR                                                      (Enhanced)
  12420.  
  12421.           Purpose:    Display information about files and subdirectories.
  12422.  
  12423.           Format:     DIR [/1 /2 /4 /A[[:][-]rhsda] /B /C /D /F /J /K /L /M
  12424.                            /N /O[[:][-]adeginrsu] /P /S /T /U /V /W]
  12425.                            [file...]
  12426.  
  12427.                       file:  The file, directory, or list of files or
  12428.                       directories to display.
  12429.  
  12430.                       /1  (one column)            /L(ower case)
  12431.                       /2  (two columns)           /M  (suppress footer)
  12432.                       /4  (four columns)          /N  (reset DIR options)
  12433.                       /A(ttribute select)         /O  (sort order )
  12434.                       /B(are)                     /P(ause)
  12435.                       /C(ase -- use upper case)   /S(ubdirectories)
  12436.                       /D(isable colorization)     /T  (aTtribute display)
  12437.                       /F(ull path)                /U  (sUmmary information)
  12438.                       /J(ustify names)            /V(ertical sort)
  12439.                       /K  (suppress header)       /W(ide)
  12440.  
  12441.                       See also: ATTRIB, DESCRIBE, SELECT, and SETDOS.
  12442.  
  12443.           Usage:      DIR can be used to display information about files from
  12444.                       one or more of your disk directories, in a wide range
  12445.                       of formats.  Depending on the options chosen, you can
  12446.                       display the file name, attributes, and size; the time
  12447.                       and date of the last change to the file; and the file
  12448.                       description.  You can also display information in 1, 2,
  12449.                       4, or 5 columns, sort the files several different ways,
  12450.                       use color to distinguish file types, and pause after
  12451.                       each full screen.
  12452.  
  12453.                       The various DIR displays are controlled through options
  12454.                       or switches.  The best way to learn how to use the many
  12455.                       options available with the DIR command is to
  12456.                       experiment.  You will soon know which options you want
  12457.                       to use regularly.  You can select those options
  12458.                       permanently by using the ALIAS command.  You may want
  12459.                       to mix several options.  For example, to display all
  12460.                       the files in the current directory, in 2 columns,
  12461.                       sorted vertically (down one column then down the next),
  12462.                       and with a pause at the end of each page:
  12463.  
  12464.                            c:\> dir /2/p/v
  12465.  
  12466.                       To set up this format as the default, using an alias:
  12467.  
  12468.  
  12469.           ___________________________________________________________________
  12470.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  211
  12471.  
  12472.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12473.           ___________________________________________________________________
  12474.  
  12475.  
  12476.  
  12477.                            c:\> alias dir=`*dir /2/p/v`
  12478.  
  12479.                       This example displays all the files on all directories
  12480.                       of drive C, including hidden and system files, pausing
  12481.                       after each page:
  12482.  
  12483.                            c:\> dir /s/a/p c:\
  12484.  
  12485.                       DIR allows wildcard characters (* and ?) in the
  12486.                       filename.  If you don't specify a filename, DIR
  12487.                       defaults to *.* (display all non-hidden files and
  12488.                       subdirectories in the current directory).  To display
  12489.                       all of the .WKS files in the current directory:
  12490.  
  12491.                            c:\> dir *.wks
  12492.  
  12493.                       If you link two or more filenames together with spaces,
  12494.                       DIR will display all of the files that match the first
  12495.                       name and then all of the files that match the second
  12496.                       name.  You may use a different drive and path for each
  12497.                       filename.  This example lists all of the .WKS and then
  12498.                       all of the .WK1 files in the current directory:
  12499.  
  12500.                            c:\> dir *.wks *.wk1
  12501.  
  12502.                       If you link multiple filenames with a semi-colon [;]
  12503.                       (an "include list", see page 75), DIR will display the
  12504.                       matching filenames in a single listing.  Only the first
  12505.                       filename in an include list can have a path; the other
  12506.                       files must be in the same path.  This example displays
  12507.                       the same files as the previous example, but the .WKS
  12508.                       and .WK1 files are intermixed:
  12509.  
  12510.                            c:\> dir *.wks;*.wk1
  12511.  
  12512.                       If you have an ANSI driver loaded, you can display the
  12513.                       file and subdirectory names in color by setting the
  12514.                       COLORDIR environment variable.  The format for COLORDIR
  12515.                       is:
  12516.  
  12517.                            ext ... :[BRIght][BLInk] fg [ON bg]; ...
  12518.  
  12519.                       where "ext" is a file extension (1 to 3 characters) or
  12520.                       one of the following file types:
  12521.  
  12522.                            DIRS - directories
  12523.                            RDONLY - read-only files
  12524.  
  12525.  
  12526.           ___________________________________________________________________
  12527.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  212
  12528.  
  12529.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12530.           ___________________________________________________________________
  12531.  
  12532.  
  12533.                            HIDDEN - hidden files
  12534.                            SYSTEM - system files
  12535.                            ARCHIVE - files modified since the last backup
  12536.  
  12537.                       For example, to display the .COM and .EXE files in red,
  12538.                       the .C and .ASM files in bright cyan, and the read-only
  12539.                       files in blinking green (this should be entered on one
  12540.                       line):
  12541.  
  12542.                            c:\> set colordir=com exe:red; c asm:bright cyan;
  12543.                                 rdonly:blink green
  12544.  
  12545.                       If you don't specify a background color, DIR will use
  12546.                       the current screen background color.  COLORDIR will not
  12547.                       work properly unless you have an ANSI driver loaded.
  12548.  
  12549.                       If you have COLORDIR set and attempt to redirect the
  12550.                       output of DIR to a character device, such as a serial
  12551.                       port or the printer, non-colorized file names will be
  12552.                       displayed on the device but colorized names will still
  12553.                       be displayed on the screen.  This will not occur if the
  12554.                       output of DIR is redirected to a disk file.  To avoid
  12555.                       this problem, use the /D switch to disable directory
  12556.                       colorization when redirecting the output of DIR to a
  12557.                       character device.
  12558.  
  12559.                       When displaying file descriptions, DIR adds a right
  12560.                       arrow at the end of the line if the description is too
  12561.                       long to fit on the screen.  This symbol will alert you
  12562.                       to the existence of additional description text.
  12563.  
  12564.                   ##  Extended wildcards (for example "BA[KXC]" for .BAK,
  12565.                       .BAX, and .BAC files) can be used in directory color
  12566.                       specifications.  See page 71 for more information on
  12567.                       extended wildcards.
  12568.  
  12569.                   ##  When sorting file names and extensions, 4DOS normally
  12570.                       assumes that sequences of digits should be sorted
  12571.                       numerically (for example, the file DRAW2 would come
  12572.                       before DRAW03 because 2 is numerically larger than 03),
  12573.                       rather than strictly alphabetically (where DRAW2 would
  12574.                       come second because "2" is more than "0").  You can
  12575.                       defeat this behavior and force a strict alphabetic sort
  12576.                       with the /O:a option.
  12577.  
  12578.                   ##  If a country code was defined in the CONFIG.SYS file or
  12579.                       by the CHCP command, DIR will display the date in the
  12580.                       format for that country.  The default date format is
  12581.  
  12582.  
  12583.           ___________________________________________________________________
  12584.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  213
  12585.  
  12586.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12587.           ___________________________________________________________________
  12588.  
  12589.  
  12590.                       U.S. (mm-dd-yy).  The separator character in the file
  12591.                       time will also be affected by the country code.
  12592.  
  12593.                   ##  DIR can handle directories of any size, limited only by
  12594.                       available memory.  Each filename requires 32 bytes of
  12595.                       free base memory plus the size of the description (if
  12596.                       any); a system with 128K of free base memory can
  12597.                       display up to 4,000 files per directory.
  12598.  
  12599.                   ##  Options on the command line apply only to the filenames
  12600.                       which follow the option, and options at the end of the
  12601.                       line apply to the preceding filename only.  This allows
  12602.                       you to specify different options for different groups
  12603.                       of files, yet retains compatibility with the
  12604.                       traditional DIR command when a single filename is
  12605.                       specified.
  12606.  
  12607.           Options:    /1:  Single column display -- display the filename,
  12608.                       size, date, time, and description.  This is the
  12609.                       default.
  12610.  
  12611.                       /2:  Two column display -- display the filename, size,
  12612.                       date, and time.
  12613.  
  12614.                       /4:  Four column display -- display the filename and
  12615.                       size, in K (kilobytes) or M (megabytes).
  12616.  
  12617.                   ##  /A(ttribute select): Display only those files that have
  12618.                       the specified attribute(s) set.  Preceding the
  12619.                       attribute character with a hyphen [-] will display
  12620.                       those files that DON'T have that attribute set.  The
  12621.                       attributes are:
  12622.  
  12623.                            R    Read-only         D    Subdirectory
  12624.                            H    Hidden            A    Archive
  12625.                            S    System
  12626.  
  12627.                       If no attributes are listed at all (e.g. DIR /A), DIR
  12628.                       will display all files and subdirectories including
  12629.                       hidden and system files.  If attributes are combined,
  12630.                       all the specified attributes must match for a file to
  12631.                       be included in the listing.  For example, /A:RHS will
  12632.                       display only those files with all three attributes set.
  12633.                       See page 183 for more information on file attributes.
  12634.  
  12635.                   ##  /B(are):  Suppress the header and summary lines, and
  12636.                       display file or subdirectory names only, in a single
  12637.  
  12638.  
  12639.  
  12640.           ___________________________________________________________________
  12641.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  214
  12642.  
  12643.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12644.           ___________________________________________________________________
  12645.  
  12646.  
  12647.                       column.  This option is most useful when you want to
  12648.                       redirect a list of names to a file or another program.
  12649.  
  12650.                       /C(ase):  Display filenames in the traditional upper
  12651.                       case; also see SETDOS /U (page 301) and the UpperCase
  12652.                       directive in 4DOS.INI (page 132).
  12653.  
  12654.                   ##  /D(isable colorization):  Temporarily disable directory
  12655.                       colorization.  Required when COLORDIR is set and DIR
  12656.                       output is redirected to a character device like the
  12657.                       printer (e.g. PRN or LPT1) or serial port (e.g. COM1 or
  12658.                       COM2).
  12659.  
  12660.                   ##  /F(ull path):  Display each filename with its drive
  12661.                       letter and path in a single column, without other
  12662.                       information.
  12663.  
  12664.                       /J(ustify):  Justify (align) filename extensions and
  12665.                       display them in the traditional format.
  12666.  
  12667.                   ##  /K:  Suppress the header (disk and directory name)
  12668.                       display.
  12669.  
  12670.                       /L(ower case):  Display filenames in lower case; also
  12671.                       see SETDOS /U (page 301) and the UpperCase directive in
  12672.                       4DOS.INI (page 132).
  12673.  
  12674.                   ##  /M:  Suppress the footer (file and byte count total)
  12675.                       display.
  12676.  
  12677.                       /N:  Reset the DIR options to the default values.  This
  12678.                       is useful when you want to display some files in one
  12679.                       format, and then change back to the defaults for
  12680.                       another set of files.
  12681.  
  12682.                       /O(rder):  Set the sorting order.  You may use any
  12683.                       combination of the following sorting options; if
  12684.                       multiple options are used the listing will be sorted
  12685.                       with the first sort option as the primary key, the next
  12686.                       as the secondary key, and so on:
  12687.  
  12688.                            -    Reverse the sort order for the next option
  12689.                            a    Sort names and extensions in standard ASCII
  12690.                                 order, rather than sorting numerically when
  12691.                                 digits are included in the name or extension
  12692.                            d    Sort by date and time (oldest first)
  12693.                            e    Sort by extension
  12694.                            g    Group subdirectories together
  12695.  
  12696.  
  12697.           ___________________________________________________________________
  12698.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  215
  12699.  
  12700.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12701.           ___________________________________________________________________
  12702.  
  12703.  
  12704.                            i    Sort by the file description
  12705.                            n    Sort by filename (this is the default)
  12706.                            r    Reverse the sort order for all options
  12707.                            s    Sort by size
  12708.                            u    Unsorted
  12709.  
  12710.                       /P(ause):  Wait for a key to be pressed after each
  12711.                       screen page before continuing the display.
  12712.  
  12713.                       /S(ubdirectories):  Display file information from the
  12714.                       current directory and all of its subdirectories.  DIR
  12715.                       will only display headers and summaries for those
  12716.                       directories with files that match the filename(s) and
  12717.                       attributes (if /A is used) that you specify on the
  12718.                       command line.
  12719.  
  12720.                   ##  /T  (aTtributes):  Display the filenames and attributes
  12721.                       only.  The attributes are displayed in the format RHSA,
  12722.                       where:
  12723.  
  12724.                            R    Read-only
  12725.                            H    Hidden
  12726.                            S    System
  12727.                            A    Archive
  12728.  
  12729.                       /U (sUmmary information):  Only display the number of
  12730.                       files, the total file size, and the total amount of
  12731.                       disk space used.
  12732.  
  12733.                       /V(ertical sort):  Display the filenames sorted
  12734.                       vertically rather than horizontally (used with the /2,
  12735.                       /4 or /W options).
  12736.  
  12737.                       /W(ide):  Display filenames only, horizontally across
  12738.                       the screen (5 columns on an 80-character wide display).
  12739.  
  12740.  
  12741.  
  12742.  
  12743.  
  12744.  
  12745.  
  12746.  
  12747.  
  12748.  
  12749.  
  12750.  
  12751.  
  12752.  
  12753.  
  12754.           ___________________________________________________________________
  12755.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  216
  12756.  
  12757.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIRS
  12758.           ___________________________________________________________________
  12759.  
  12760.  
  12761.           DIRS                                                          (New)
  12762.  
  12763.           Purpose:    Display the current directory stack.
  12764.  
  12765.           Format:     DIRS
  12766.  
  12767.                       See also: PUSHD and POPD.
  12768.  
  12769.           Usage:      The PUSHD command adds the current default drive and
  12770.                       directory to the directory stack, a list that 4DOS
  12771.                       maintains in memory.  The POPD command removes the top
  12772.                       entry of the directory stack and makes that drive and
  12773.                       directory the new default.  The DIRS command displays
  12774.                       the contents of the directory stack, with the most
  12775.                       recent entries on top (i.e., the next POPD will
  12776.                       retrieve the first entry that DIRS displays).
  12777.  
  12778.                       For example, to change directories and then display the
  12779.                       directory stack:
  12780.  
  12781.                            c:\> pushd c:\database
  12782.                            c:\database> pushd d:\wordp\memos
  12783.                            d:\wordp\memos> dirs
  12784.                            c:\database
  12785.                            c:\
  12786.  
  12787.                       The directory stack holds 255 characters, enough for
  12788.                       about 10 to 20 typical drive and directory entires.
  12789.  
  12790.  
  12791.  
  12792.  
  12793.  
  12794.  
  12795.  
  12796.  
  12797.  
  12798.  
  12799.  
  12800.  
  12801.  
  12802.  
  12803.  
  12804.  
  12805.  
  12806.  
  12807.  
  12808.  
  12809.  
  12810.  
  12811.           ___________________________________________________________________
  12812.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  217
  12813.  
  12814.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DRAWBOX
  12815.           ___________________________________________________________________
  12816.  
  12817.  
  12818.           DRAWBOX                                                       (New)
  12819.  
  12820.           Purpose:    Draw a box on the screen.
  12821.  
  12822.           Format:     DRAWBOX ulrow ulcol lrrow lrcol style [BRIght] [BLInk]
  12823.                            fg ON bg [FILl bgfill] [SHAdow]
  12824.  
  12825.                       ulrow:  Row for upper left corner
  12826.                       ulcol:  Column for upper left corner
  12827.                       lrrow:  Row for lower right corner
  12828.                       lrcol:  Column for lower right corner
  12829.                       style:  Box drawing style:
  12830.                            0    No lines (box is drawn with blanks)
  12831.                            1    Single line
  12832.                            2    Double line
  12833.                            3    Single on top and bottom, double on sides
  12834.                            4    Double on top and bottom, single on sides
  12835.                       fg:  Foreground character color
  12836.                       bg:  Background character color
  12837.                       bgfill:  Background fill color (for the inside of the
  12838.                       box)
  12839.  
  12840.                       The available colors are:
  12841.  
  12842.                         Black         Blue          Green         Red
  12843.                         Magenta       Cyan          Yellow        White
  12844.  
  12845.                       See also: DRAWHLINE and DRAWVLINE.
  12846.  
  12847.           Usage:      DRAWBOX is useful for creating attractive screen
  12848.                       displays in batch files.  DRAWBOX detects other lines
  12849.                       and boxes on the display, and creates the appropriate
  12850.                       connector characters when possible (not all types of
  12851.                       lines can be connected with the available characters).
  12852.  
  12853.                       For example, to draw a box around the entire screen
  12854.                       with bright white lines on a blue background (enter
  12855.                       this on one line):
  12856.  
  12857.                            drawbox 0 0 24 79 1 bri whi on blu fill blu
  12858.  
  12859.                       Only the first three characters of the color name and
  12860.                       the keywords BRIGHT, BLINK, FILL, and SHADOW are
  12861.                       required.
  12862.  
  12863.                       If you use SHADOW, a drop shadow is created by changing
  12864.                       the characters in the row under the box and the 2
  12865.                       columns to the right of the box to normal intensity
  12866.  
  12867.  
  12868.           ___________________________________________________________________
  12869.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  218
  12870.  
  12871.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DRAWBOX
  12872.           ___________________________________________________________________
  12873.  
  12874.  
  12875.                       text with a black background (this will make characters
  12876.                       displayed in black disappear entirely).
  12877.  
  12878.                       The row and column values are zero-based, so on a
  12879.                       standard 25 line by 80 column display, valid rows are 0
  12880.                       - 24 and valid columns are 0 - 79.
  12881.  
  12882.                       DRAWBOX checks for valid row and column values, and
  12883.                       displays a "Usage" error message if any values are out
  12884.                       of range.
  12885.  
  12886.  
  12887.  
  12888.  
  12889.  
  12890.  
  12891.  
  12892.  
  12893.  
  12894.  
  12895.  
  12896.  
  12897.  
  12898.  
  12899.  
  12900.  
  12901.  
  12902.  
  12903.  
  12904.  
  12905.  
  12906.  
  12907.  
  12908.  
  12909.  
  12910.  
  12911.  
  12912.  
  12913.  
  12914.  
  12915.  
  12916.  
  12917.  
  12918.  
  12919.  
  12920.  
  12921.  
  12922.  
  12923.  
  12924.  
  12925.           ___________________________________________________________________
  12926.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  219
  12927.  
  12928.                             CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DRAWHLINE
  12929.           ___________________________________________________________________
  12930.  
  12931.  
  12932.           DRAWHLINE                                                     (New)
  12933.  
  12934.           Purpose:    Draw a horizontal line on the screen.
  12935.  
  12936.           Format:     DRAWHLINE row column len style [BRIght] [BLInk]
  12937.                            fg ON bg
  12938.  
  12939.                       row:  Starting row
  12940.                       column:  Starting column
  12941.                       len:  Length of line
  12942.                       style:  Line drawing style:
  12943.                            1    Single line
  12944.                            2    Double line
  12945.                       fg:  Foreground character color
  12946.                       bg:  Background character color
  12947.  
  12948.                       The available colors are:
  12949.  
  12950.                         Black         Blue          Green         Red
  12951.                         Magenta       Cyan          Yellow        White
  12952.  
  12953.                       See also: DRAWBOX and DRAWVLINE.
  12954.  
  12955.           Usage:      DRAWHLINE is useful for creating attractive screen
  12956.                       displays in batch files.  It detects other lines and
  12957.                       boxes on the display, and creates the appropriate
  12958.                       connector characters when possible (not all types of
  12959.                       lines can be connected with the available characters).
  12960.  
  12961.                       For example, the following command draws a double line
  12962.                       along the top row of the display with green characters
  12963.                       on a blue background:
  12964.  
  12965.                            drawhline 0 0 80 2 green on blue
  12966.  
  12967.                       Only the first three characters of the color name and
  12968.                       the attributes BRIGHT and BLINK are required.
  12969.  
  12970.                       The row and column values are zero-based, so on a
  12971.                       standard 25 line by 80 column display, valid rows are 0
  12972.                       - 24 and valid columns are 0 - 79.
  12973.  
  12974.                       DRAWHLINE checks for a valid row and column, and
  12975.                       displays a "Usage" error message if either value is out
  12976.                       of range.
  12977.  
  12978.  
  12979.  
  12980.  
  12981.  
  12982.           ___________________________________________________________________
  12983.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  220
  12984.  
  12985.                             CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DRAWVLINE
  12986.           ___________________________________________________________________
  12987.  
  12988.  
  12989.           DRAWVLINE                                                     (New)
  12990.  
  12991.           Purpose:    Draw a vertical line on the screen.
  12992.  
  12993.           Format:     DRAWVLINE row column len style [BRIght][BLInk]
  12994.                            fg ON bg
  12995.  
  12996.                       row:  Starting row
  12997.                       column:  Starting column
  12998.                       len:  Length of line
  12999.                       style:  Line drawing style:
  13000.                            1    Single line
  13001.                            2    Double line
  13002.                       fg:  Foreground character color
  13003.                       bg:  Background character color
  13004.  
  13005.                       The available colors are:
  13006.  
  13007.                         Black         Blue          Green         Red
  13008.                         Magenta       Cyan          Yellow        White
  13009.  
  13010.                       See also: DRAWBOX and DRAWHLINE.
  13011.  
  13012.           Usage:      DRAWVLINE is useful for creating attractive screen
  13013.                       displays in batch files.  It detects other lines and
  13014.                       boxes on the display, and creates the appropriate
  13015.                       connector characters when possible (not all types of
  13016.                       lines can be connected with the available characters).
  13017.  
  13018.                       For example, to draw a double width line along the left
  13019.                       margin of the display with bright red characters on a
  13020.                       black background:
  13021.  
  13022.                            drawvline 0 0 25 2 bright red on black
  13023.  
  13024.                       Only the first three characters of the color name and
  13025.                       the attributes BRIGHT and BLINK are required.
  13026.  
  13027.                       The row and column values are zero-based, so on a
  13028.                       standard 25 line by 80 column display, valid rows are 0
  13029.                       - 24 and valid columns are 0 - 79.
  13030.  
  13031.                       DRAWVLINE checks for a valid row and column, and
  13032.                       displays a "Usage" error message if either value is out
  13033.                       of range.
  13034.  
  13035.  
  13036.  
  13037.  
  13038.  
  13039.           ___________________________________________________________________
  13040.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  221
  13041.  
  13042.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ECHO
  13043.           ___________________________________________________________________
  13044.  
  13045.  
  13046.           ECHO                                                     (Enhanced)
  13047.  
  13048.           Purpose:    Display a message, enable or disable batch file or
  13049.                       command line echoing, or display the echo status.
  13050.  
  13051.           Format:     ECHO [ON | OFF | message]
  13052.  
  13053.                       message:  Text to display.
  13054.  
  13055.                       See also: ECHOS, SCREEN, SCRPUT, SETDOS and TEXT.
  13056.  
  13057.           Usage:      4DOS has a separate echo capability for batch files and
  13058.                       for the command line.
  13059.  
  13060.                       In a batch file, if you turn ECHO on, each line of the
  13061.                       file is displayed before it is executed.  If you turn
  13062.                       ECHO off, each line is executed without being
  13063.                       displayed.  ECHO can also be used in a batch file to
  13064.                       display a message on the screen.  Regardless of the
  13065.                       ECHO state, a batch file line that begins with the [@]
  13066.                       character will not be displayed.  To turn off batch
  13067.                       file echoing, without displaying the ECHO command, use
  13068.                       this line:
  13069.  
  13070.                            @echo off
  13071.  
  13072.                       ECHO commands in a batch file will send messages to the
  13073.                       screen while the batch file executes, even if ECHO is
  13074.                       set OFF.  For example, this line will display a message
  13075.                       in a batch file:
  13076.  
  13077.                            echo Processing your print files...
  13078.  
  13079.                       If you want to echo a blank line from within a batch
  13080.                       file, enter:
  13081.  
  13082.                            echo.
  13083.  
  13084.                       You cannot use the command separator character [^] or
  13085.                       the 4DOS redirection symbols (| > <) in an ECHO
  13086.                       message, unless you enclose them in quotes or precede
  13087.                       them with the escape character (see page 94).
  13088.  
  13089.                       4DOS defaults to ECHO ON in batch files.  The current
  13090.                       ECHO state is inherited by called batch files.  You can
  13091.                       change the default setting to ECHO OFF with the SETDOS
  13092.                       /V0 command or the BatchEcho directive in 4DOS.INI (see
  13093.                       page 129).
  13094.  
  13095.  
  13096.           ___________________________________________________________________
  13097.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  222
  13098.  
  13099.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ECHO
  13100.           ___________________________________________________________________
  13101.  
  13102.  
  13103.  
  13104.                       If you turn the command line ECHO on, 4DOS will display
  13105.                       each command before it is executed.  This will let you
  13106.                       see the command line after 4DOS has expanded all
  13107.                       aliases and variables.  The command line ECHO is most
  13108.                       useful when you are learning how to use the advanced
  13109.                       features of 4DOS.  This example will turn command line
  13110.                       echoing on:
  13111.  
  13112.                            c:\> echo on
  13113.  
  13114.                       4DOS defaults to ECHO OFF during keyboard input.  The
  13115.                       keyboard ECHO state is independent of the batch file
  13116.                       ECHO state;  changing ECHO in a batch file has no
  13117.                       effect on the display at the command prompt, and vice
  13118.                       versa.
  13119.  
  13120.                       To see the current echo state, use the ECHO command
  13121.                       with no arguments.  This displays either the batch file
  13122.                       or command line echo state, depending on where the ECHO
  13123.                       command is performed.
  13124.  
  13125.  
  13126.  
  13127.  
  13128.  
  13129.  
  13130.  
  13131.  
  13132.  
  13133.  
  13134.  
  13135.  
  13136.  
  13137.  
  13138.  
  13139.  
  13140.  
  13141.  
  13142.  
  13143.  
  13144.  
  13145.  
  13146.  
  13147.  
  13148.  
  13149.  
  13150.  
  13151.  
  13152.  
  13153.           ___________________________________________________________________
  13154.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  223
  13155.  
  13156.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ECHOS
  13157.           ___________________________________________________________________
  13158.  
  13159.  
  13160.           ECHOS                                                         (New)
  13161.  
  13162.           Purpose:    Display a message without a trailing carriage return
  13163.                       and line feed.
  13164.  
  13165.           Format:     ECHOS message
  13166.  
  13167.                       See also: ECHO, SCREEN, SCRPUT, TEXT, and VSCRPUT.
  13168.  
  13169.           Usage:      ECHOS is useful for outputting text when you don't want
  13170.                       4DOS to add a carriage return / linefeed pair.  For
  13171.                       example, you can use ECHOS when you need to redirect
  13172.                       control sequences to your printer (the "^X" represents
  13173.                       the 4DOS escape character, which is normally Ctrl-X):
  13174.  
  13175.                            c:\> echos ^XeP > lpt1:
  13176.  
  13177.                       You cannot use the command separator character [^] or
  13178.                       the 4DOS redirection symbols (|><) in an ECHOS message,
  13179.                       unless you enclose them in quotes or preceded them with
  13180.                       the escape character (see page 94).
  13181.  
  13182.                   ##  ECHOS does not translate or modify the message text.
  13183.                       For example, carriage return characters are not
  13184.                       translated to CR/LF pairs.  ECHOS sends only the
  13185.                       characters you enter (after 4DOS escape character and
  13186.                       back-quote processing as described above).  The only
  13187.                       character you cannot put into an ECHOS message is the
  13188.                       NUL character (ASCII 0).
  13189.  
  13190.  
  13191.  
  13192.  
  13193.  
  13194.  
  13195.  
  13196.  
  13197.  
  13198.  
  13199.  
  13200.  
  13201.  
  13202.  
  13203.  
  13204.  
  13205.  
  13206.  
  13207.  
  13208.  
  13209.  
  13210.           ___________________________________________________________________
  13211.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  224
  13212.  
  13213.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ENDLOCAL
  13214.           ___________________________________________________________________
  13215.  
  13216.  
  13217.           ENDLOCAL                                                      (New)
  13218.  
  13219.           Purpose:    Restore the saved disk drive, directory, environment,
  13220.                       and alias list.
  13221.  
  13222.           Format:     ENDLOCAL
  13223.  
  13224.                       See also: SETLOCAL.
  13225.  
  13226.           ## Usage:   The SETLOCAL command in a batch file saves the current
  13227.                       disk drive, default directory, all environment
  13228.                       variables, and the alias list.  ENDLOCAL restores
  13229.                       everything that was saved by the previous SETLOCAL
  13230.                       command.
  13231.  
  13232.                       For example, this batch file fragment saves the drive,
  13233.                       current working directory, and environment variables,
  13234.                       changes the drive and directory, sets some environment
  13235.                       variables, runs the program TEST1, and then restores
  13236.                       the original values:
  13237.  
  13238.                            setlocal
  13239.                            cdd d:\test
  13240.                            set path=c:\;c:\dos;c:\util
  13241.                            set lib=d:\lib
  13242.                            test1
  13243.                            endlocal
  13244.  
  13245.                       SETLOCAL and ENDLOCAL can only be used in batch files,
  13246.                       not in aliases or from the command line.
  13247.  
  13248.  
  13249.  
  13250.  
  13251.  
  13252.  
  13253.  
  13254.  
  13255.  
  13256.  
  13257.  
  13258.  
  13259.  
  13260.  
  13261.  
  13262.  
  13263.  
  13264.  
  13265.  
  13266.  
  13267.           ___________________________________________________________________
  13268.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  225
  13269.  
  13270.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ESET
  13271.           ___________________________________________________________________
  13272.  
  13273.  
  13274.           ESET                                                          (New)
  13275.  
  13276.           Purpose:    Edit environment variables and aliases.
  13277.  
  13278.           Format:     ESET [/M] variable name...
  13279.  
  13280.                       variable name:  The name of an environment variable or
  13281.                       alias to edit.
  13282.  
  13283.                       /M(aster environment)
  13284.  
  13285.                       See also: ALIAS, UNALIAS, SET, and UNSET.
  13286.  
  13287.           Usage:      ESET allows you to edit environment variables and
  13288.                       aliases using the 4DOS line editing commands (see page
  13289.                       55).
  13290.  
  13291.                       For example, to edit the executable file search path:
  13292.  
  13293.                            c:\> eset path
  13294.                            path=c:\;c:\dos;c:\util
  13295.  
  13296.                       To create and then edit an alias:
  13297.  
  13298.                            c:\> alias d dir /d/j/p
  13299.                            c:\> eset d
  13300.                            d=dir /d/j/p
  13301.  
  13302.                       ESET will search for environment variables first and
  13303.                       then aliases.  If you have an environment variable and
  13304.                       an alias with the same name, ESET will only be able to
  13305.                       edit the environment variable.
  13306.  
  13307.                       4DOS limits environment variable and alias names to 80
  13308.                       characters, and their arguments to 255 characters.
  13309.  
  13310.           Option: ##  /M(aster environment): Edit an environment variable in
  13311.                       the master environment rather than the local
  13312.                       environment.  This option is only useful from a
  13313.                       secondary command shell (for example, when an
  13314.                       application has "shelled to DOS").  /M only works for
  13315.                       environment variables; it cannot be used to edit the
  13316.                       primary shell's aliases.
  13317.  
  13318.  
  13319.  
  13320.  
  13321.  
  13322.  
  13323.  
  13324.           ___________________________________________________________________
  13325.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  226
  13326.  
  13327.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  EXCEPT
  13328.           ___________________________________________________________________
  13329.  
  13330.  
  13331.           EXCEPT                                                        (New)
  13332.  
  13333.           Purpose:    Perform a command on all available files except those
  13334.                       specified.
  13335.  
  13336.           Format:     EXCEPT (file) command
  13337.  
  13338.                       file:  The file or files to exclude from the command.
  13339.                       command:  The command to execute, including all
  13340.                       appropriate arguments and switches.
  13341.  
  13342.                       See also: ATTRIB.
  13343.  
  13344.           Usage:      EXCEPT provides a means of executing a command on a
  13345.                       group of files and/or subdirectories, and excluding a
  13346.                       subgroup from the operation.  The command can be a 4DOS
  13347.                       internal command or alias, an external command, or a
  13348.                       batch file.
  13349.  
  13350.                       You may use wildcards to specify the files to exclude
  13351.                       from the command.  The first example erases all the
  13352.                       files in the current directory except those beginning
  13353.                       with MEMO and those ending in .WKS.  The second example
  13354.                       copies all the files and subdirectories on drive C to
  13355.                       drive D except those in C:\MSC and C:\DOS, using the
  13356.                       COPY command:
  13357.  
  13358.                            c:\> except (memo*.* *.wks) erase *.*
  13359.                            c:\> except (c:\msc c:\dos) copy c:\*.* d:\ /s
  13360.  
  13361.                   ##  If you use EXCEPT with filename completion (see page
  13362.                       59) to get the filenames inside the parentheses, type a
  13363.                       space after the open parenthesis before entering a
  13364.                       partial filename or pressing Tab.  Otherwise, the
  13365.                       command line editor will treat the open parenthesis as
  13366.                       the first character of the filename to be completed.
  13367.  
  13368.                   ##  EXCEPT prevents operations on the specified file(s) by
  13369.                       setting the hidden attribute, performing the command,
  13370.                       and then clearing the hidden attribute.  If the command
  13371.                       is aborted in an unusual way, you may need to use the
  13372.                       ATTRIB command to "unhide" (-H) the file(s).
  13373.  
  13374.                   ##  EXCEPT will not work with programs or commands that
  13375.                       ignore the hidden attribute or which work explicitly
  13376.                       with hidden files, including DEL /Z and the /H (process
  13377.                       hidden files) switch available in some 4DOS file
  13378.                       processing commands.
  13379.  
  13380.  
  13381.           ___________________________________________________________________
  13382.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  227
  13383.  
  13384.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  EXCEPT
  13385.           ___________________________________________________________________
  13386.  
  13387.  
  13388.  
  13389.                   ##  You can use command grouping (see page 92) to execute
  13390.                       multiple commands with a single EXCEPT.  For example,
  13391.                       the following command copies all files in the current
  13392.                       directory whose extensions begin with .DA, except the
  13393.                       .DAT files, to the D:\SAVE directory, then changes the
  13394.                       first two characters of the extension of the copied
  13395.                       files to .SA.  This example should be entered on one
  13396.                       line:
  13397.  
  13398.                            c:\data> except (*.dat) (copy *.da* d:\save ^
  13399.                                     ren *.da* *.sa*)
  13400.  
  13401.                   ##  You may need to increase 4DOS's internal stack size
  13402.                       using the StackSize directive in 4DOS.INI if you use
  13403.                       extremely complex combinations of commands like EXCEPT,
  13404.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  13405.                       or use complex combinations of these commands in nested
  13406.                       batch files or nested GOSUBs.  See the StackSize
  13407.                       directive on page 140 for more information.
  13408.  
  13409.  
  13410.  
  13411.  
  13412.  
  13413.  
  13414.  
  13415.  
  13416.  
  13417.  
  13418.  
  13419.  
  13420.  
  13421.  
  13422.  
  13423.  
  13424.  
  13425.  
  13426.  
  13427.  
  13428.  
  13429.  
  13430.  
  13431.  
  13432.  
  13433.  
  13434.  
  13435.  
  13436.  
  13437.  
  13438.           ___________________________________________________________________
  13439.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  228
  13440.  
  13441.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  EXIT
  13442.           ___________________________________________________________________
  13443.  
  13444.  
  13445.           EXIT                                                     (Enhanced)
  13446.  
  13447.           Purpose:    Return from a secondary command processor.
  13448.  
  13449.           Format:     EXIT [value]
  13450.  
  13451.                       value:  The exit code to return (0 - 255).
  13452.  
  13453.           Usage:      Some application programs will start a secondary copy
  13454.                       of the command processor to allow you to execute DOS
  13455.                       commands.  To return to the application again, type:
  13456.  
  13457.                            c:\> exit
  13458.  
  13459.                   ##  If you specify a value, EXIT will return that value to
  13460.                       the program that started 4DOS.  For example:
  13461.  
  13462.                            c:\> exit 255
  13463.  
  13464.                   ##  The value is a number you can use to inform the program
  13465.                       of some result, such as the success or failure of a
  13466.                       batch file.  This feature is most useful for systems
  13467.                       which use batch files to automate their operation, such
  13468.                       as bulletin boards, or custom application programs like
  13469.                       databases that shell to 4DOS to perform certain tasks.
  13470.  
  13471.                   ##  You cannot EXIT from the primary command processor
  13472.                       unless you are running in an OS/2 2.0 DOS session.
  13473.  
  13474.  
  13475.  
  13476.  
  13477.  
  13478.  
  13479.  
  13480.  
  13481.  
  13482.  
  13483.  
  13484.  
  13485.  
  13486.  
  13487.  
  13488.  
  13489.  
  13490.  
  13491.  
  13492.  
  13493.  
  13494.  
  13495.           ___________________________________________________________________
  13496.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  229
  13497.  
  13498.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  FOR
  13499.           ___________________________________________________________________
  13500.  
  13501.  
  13502.           FOR                                                      (Enhanced)
  13503.  
  13504.           Purpose:    Repeat a command for several values of a variable.
  13505.  
  13506.           Format:     FOR [/A[[:][-]rhsda]] %var IN ([@]set) [DO] command ...
  13507.  
  13508.                       %var:  The variable to be used in the command ("FOR
  13509.                       variable").
  13510.                       set:  A set of values for the variable.
  13511.                       command:  A command or group of commands to be executed
  13512.                       for each value of the variable.
  13513.  
  13514.                       /A(ttribute select)
  13515.  
  13516.           Usage:      4DOS begins the FOR command by creating a set.  It then
  13517.                       executes a command for every member of the set.  The
  13518.                       command can be a 4DOS internal command or alias, an
  13519.                       external command, or a batch file.
  13520.  
  13521.                       Normally, the set is a list of files specified with
  13522.                       wildcards.  For example, if you use this line in a
  13523.                       batch file:
  13524.  
  13525.                            for %x in (*.txt) do list %x
  13526.  
  13527.                       4DOS will create a list of all files in the current
  13528.                       directory with the extension .TXT.  It sets the FOR
  13529.                       variable %x equal to each of the file names in turn,
  13530.                       and executes the LIST command for each of the files.
  13531.  
  13532.                       The set can include multiple files or an include list,
  13533.                       like this:
  13534.  
  13535.                            for %x in (d:\*.txt;*.doc;*.asc) do type %x
  13536.  
  13537.                       The set can also be made up of text instead of file
  13538.                       names.  For example, to display the free space on
  13539.                       drives C:, D:, and E:, you could use:
  13540.  
  13541.                            for %drive in (c d e) do free %drive:
  13542.  
  13543.                       When the set is made up of text or several separate
  13544.                       file names (not an include list), the elements must be
  13545.                       separated by spaces, tabs, commas, or the switch
  13546.                       character (normally a slash [/]).
  13547.  
  13548.                   ##  You can also set the FOR variable equal to each line in
  13549.                       a file by placing an [@] in front of the file name.  If
  13550.  
  13551.  
  13552.           ___________________________________________________________________
  13553.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  230
  13554.  
  13555.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  FOR
  13556.           ___________________________________________________________________
  13557.  
  13558.  
  13559.                       you have a file called DRIVES.TXT that contains a list
  13560.                       of drives on your computer, one drive name per line
  13561.                       (with a ":" after each drive letter), you can print the
  13562.                       free space on each drive this way:
  13563.  
  13564.                            for %d in (@drives.txt) do free %d > prn
  13565.  
  13566.                   ##  Because the [@] is also a valid filename character, FOR
  13567.                       first checks to see if the file exists with the [@] in
  13568.                       its name (e.g., @DRIVES.TXT).  If so, the filename is
  13569.                       treated as a normal argument.  If it doesn't exist, FOR
  13570.                       uses the filename (without the [@]) as the file from
  13571.                       which to retrieve text.
  13572.  
  13573.                   ##  4DOS will accept either % or %% in front of the
  13574.                       variable name.  You can use either form whether the FOR
  13575.                       command is typed from the command line or is part of an
  13576.                       alias or batch file.  The variable name can be up to 80
  13577.                       characters long.  The word DO is optional.
  13578.  
  13579.                   ##  If you use a single-character FOR variable name 4DOS
  13580.                       will give that name priority over any environment
  13581.                       variable which starts with the same letter, in order to
  13582.                       maintain compatibility with the traditional FOR
  13583.                       command.  For example, the following command tries to
  13584.                       add a: and b: to the end of the PATH, but will not work
  13585.                       as intended:
  13586.  
  13587.                            c:\> for %p in (a: b:) do path %path;%p
  13588.  
  13589.                       The "%p" in "%path" will be interpreted as the FOR
  13590.                       variable %p followed by the text "ath", which is not
  13591.                       what was intended.  To get around this, use a different
  13592.                       letter or a longer name for the FOR variable, or use
  13593.                       square brackets around the variable name (see page 79).
  13594.  
  13595.                   ##  The following example uses FOR with variable functions
  13596.                       to delete the .BAK files for which a corresponding .TXT
  13597.                       file exists in the current directory (this should be
  13598.                       entered on one line):
  13599.  
  13600.                            c:\docs> for %file in (*.txt) do if exist
  13601.                                     %file del %@name[%file].bak
  13602.  
  13603.                   ##  You can use command grouping (see page 92) to execute
  13604.                       multiple commands for each element in the list.  For
  13605.                       example, the following command copies each .WKQ file in
  13606.                       the current directory to the D:\WKSAVE directory, and
  13607.  
  13608.  
  13609.           ___________________________________________________________________
  13610.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  231
  13611.  
  13612.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  FOR
  13613.           ___________________________________________________________________
  13614.  
  13615.  
  13616.                       then changes the extension of each file in the current
  13617.                       directory to .SAV.  This example should be entered on
  13618.                       one line:
  13619.  
  13620.                            c:\text> for %file in (*.wkq) do (copy %file
  13621.                                     d:\wksave\ ^ ren %file *.sav)
  13622.  
  13623.                   ##  In a batch file you can use GOSUB to execute a
  13624.                       subroutine for every element in the set.  Within the
  13625.                       subroutine the FOR variable can be used just like any
  13626.                       environment variable.  This is a convenient way to
  13627.                       execute a complex sequence of commands for every
  13628.                       element in the set without CALLing another batch file.
  13629.  
  13630.                   ##  One unusual use of FOR is to execute a collection of
  13631.                       batch files or other commands with the same parameter.
  13632.                       For example, you might want to have three batch files
  13633.                       all operate on the same data file.  The FOR command
  13634.                       could look like this (this should all be entered on one
  13635.                       line):
  13636.  
  13637.                            c:\> for %x in (filetest fileform fileprnt)
  13638.                                 do %x datafile
  13639.  
  13640.                       4DOS will expand this to three separate commands:
  13641.  
  13642.                            filetest datafile
  13643.                            fileform datafile
  13644.                            fileprnt datafile
  13645.  
  13646.                   ##  The variable that FOR uses (the %X in the example
  13647.                       above) is created in the environment and then erased
  13648.                       when the FOR command is done.  Because of this, you
  13649.                       must be careful not to use the name of one of your
  13650.                       environment variables as a FOR variable.  For example,
  13651.                       a command that begins
  13652.  
  13653.                            c:\> for %path in (...
  13654.  
  13655.                       will write over your current path setting and then
  13656.                       erase the path variable completely.
  13657.  
  13658.                   ##  FOR statements can be nested.  The permissible nesting
  13659.                       level depends on the amount of free space in 4DOS's
  13660.                       internal stack.
  13661.  
  13662.                   ##  You may need to increase 4DOS's internal stack size
  13663.                       using the StackSize directive in 4DOS.INI if you use
  13664.  
  13665.  
  13666.           ___________________________________________________________________
  13667.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  232
  13668.  
  13669.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  FOR
  13670.           ___________________________________________________________________
  13671.  
  13672.  
  13673.                       extremely complex combinations of commands like EXCEPT,
  13674.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  13675.                       or use complex combinations of these commands in nested
  13676.                       batch files or nested GOSUBs.  See the StackSize
  13677.                       directive on page 140 for more information.
  13678.  
  13679.           Options: ## /A(ttribute select): Process only those files that have
  13680.                       the specified attribute(s).  /A will be used only when
  13681.                       processing wildcard file names in the set.  It will be
  13682.                       ignored for filenames without wildcards or other items
  13683.                       in the set.  Preceding the attribute character with a
  13684.                       hyphen [-] will process those files that DON'T have
  13685.                       that attribute set.  The attributes are:
  13686.  
  13687.                            R    Read-only         D    Subdirectory
  13688.                            H    Hidden            A    Archive
  13689.                            S    System
  13690.  
  13691.                       If no attributes are listed at all (e.g. FOR /A ...),
  13692.                       FOR will process all files including hidden and system
  13693.                       files.  If attributes are combined, all the specified
  13694.                       attributes must match for a file to be included.  For
  13695.                       example, /A:RHS will include only those files with all
  13696.                       three attributes set.  See page 183 for more
  13697.                       information on file attributes.
  13698.  
  13699.                       For example, to process only those files with the
  13700.                       archive attribute:
  13701.  
  13702.                            for /a:a %%f in (*.*) echo %%f needs a backup!
  13703.  
  13704.  
  13705.  
  13706.  
  13707.  
  13708.  
  13709.  
  13710.  
  13711.  
  13712.  
  13713.  
  13714.  
  13715.  
  13716.  
  13717.  
  13718.  
  13719.  
  13720.  
  13721.  
  13722.  
  13723.           ___________________________________________________________________
  13724.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  233
  13725.  
  13726.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  FREE
  13727.           ___________________________________________________________________
  13728.  
  13729.  
  13730.           FREE                                                          (New)
  13731.  
  13732.           Purpose:    Display the total disk space, total bytes used, and
  13733.                       total bytes free on the specified (or default)
  13734.                       drive(s).
  13735.  
  13736.           Format:     FREE [drive: ...]
  13737.  
  13738.                       drive:  One or more drives to include in the report.
  13739.  
  13740.                       See also: MEMORY.
  13741.  
  13742.           Usage:      FREE provides the same disk information as the external
  13743.                       DOS command CHKDSK, but without the wait, since it does
  13744.                       not check the integrity of the file and directory
  13745.                       structure of the disk.
  13746.  
  13747.                       A colon [:] is required after each drive letter.  This
  13748.                       example displays the status of drives A and C:
  13749.  
  13750.                            c:\> free a: c:
  13751.                             Volume in drive A: is unlabeled
  13752.                              1,213,952 bytes total disk space
  13753.                              1,115,136 bytes used
  13754.                                 98,816 bytes free
  13755.                             Volume in drive C: is DEVELOPMENT
  13756.                             42,496,000 bytes total disk space
  13757.                             36,851,712 bytes used
  13758.                              5,644,288 bytes free
  13759.  
  13760.                       If you are using DOS 4.0 or later, the disk serial
  13761.                       number will appear after the drive label or name.
  13762.  
  13763.                       Some networks with large server disk drives (256 MB or
  13764.                       more) may report disk space values that are too small
  13765.                       when FREE is used.  If this occurs, it is because the
  13766.                       network software does not provide a way to return
  13767.                       larger values to 4DOS.
  13768.  
  13769.  
  13770.  
  13771.  
  13772.  
  13773.  
  13774.  
  13775.  
  13776.  
  13777.  
  13778.  
  13779.  
  13780.           ___________________________________________________________________
  13781.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  234
  13782.  
  13783.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GLOBAL
  13784.           ___________________________________________________________________
  13785.  
  13786.  
  13787.           GLOBAL                                                        (New)
  13788.  
  13789.           Purpose:    Execute a command in the current directory and its
  13790.                       subdirectories.
  13791.  
  13792.           Format:     GLOBAL [/H /I /Q] command
  13793.  
  13794.                       command:  The command to execute, including arguments
  13795.                       and switches.
  13796.  
  13797.                       /H(idden directories)            /Q(uiet)
  13798.                       /I(gnore exit codes)
  13799.  
  13800.           Usage:      GLOBAL performs the command first in the current
  13801.                       directory and then in every subdirectory under the
  13802.                       current directory.  The command can be a 4DOS internal
  13803.                       command or alias, an external command, or a batch file.
  13804.  
  13805.                       The first example erases all the files with a .BAK
  13806.                       extension in every directory on C.  The second example
  13807.                       copies the files in every directory on drive A to the
  13808.                       directory C:\TEMP:
  13809.  
  13810.                            c:\> global erase *.bak
  13811.                            a:\> global copy *.* c:\temp
  13812.  
  13813.                   ##  You can use command grouping (see page 92) to execute
  13814.                       multiple commands in each subdirectory.  For example,
  13815.                       the following command copies each .TXT file in the
  13816.                       current directory and all of its subdirectories to
  13817.                       drive A.  It then changes the extension of each of the
  13818.                       copied files to .SAV:
  13819.  
  13820.                            c:\> global (copy *.txt a: ^ ren *.txt *.sav)
  13821.  
  13822.                   ##  You may need to increase 4DOS's internal stack size
  13823.                       using the StackSize directive in 4DOS.INI if you use
  13824.                       extremely complex combinations of commands like EXCEPT,
  13825.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  13826.                       or use complex combinations of these commands in nested
  13827.                       batch files or nested GOSUBs.  See the StackSize
  13828.                       directive on page 140 for more information.
  13829.  
  13830.           Options:##  /H(idden directories):  Forces GLOBAL to look for
  13831.                       hidden directories.  If you don't use this switch,
  13832.                       hidden directories are ignored.
  13833.  
  13834.  
  13835.  
  13836.  
  13837.           ___________________________________________________________________
  13838.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  235
  13839.  
  13840.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GLOBAL
  13841.           ___________________________________________________________________
  13842.  
  13843.  
  13844.  
  13845.                   ##  /I(gnore exit codes):  If this option is not specified,
  13846.                       GLOBAL will terminate if the command returns a non-zero
  13847.                       exit code.  Use /I if you want command to continue in
  13848.                       additional subdirectories even if it returns an error
  13849.                       in a previous subdirectory.
  13850.  
  13851.                       /Q(uiet):  Do not display the directory names as each
  13852.                       directory is processed.
  13853.  
  13854.  
  13855.  
  13856.  
  13857.  
  13858.  
  13859.  
  13860.  
  13861.  
  13862.  
  13863.  
  13864.  
  13865.  
  13866.  
  13867.  
  13868.  
  13869.  
  13870.  
  13871.  
  13872.  
  13873.  
  13874.  
  13875.  
  13876.  
  13877.  
  13878.  
  13879.  
  13880.  
  13881.  
  13882.  
  13883.  
  13884.  
  13885.  
  13886.  
  13887.  
  13888.  
  13889.  
  13890.  
  13891.  
  13892.  
  13893.  
  13894.           ___________________________________________________________________
  13895.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  236
  13896.  
  13897.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GOSUB
  13898.           ___________________________________________________________________
  13899.  
  13900.  
  13901.           GOSUB                                                         (New)
  13902.  
  13903.           Purpose:    Execute a subroutine in the current batch file.
  13904.  
  13905.           Format:     GOSUB label
  13906.  
  13907.                       label:  The batch file line label at the beginning of
  13908.                       the subroutine.
  13909.  
  13910.                       See also: CALL, GOTO and RETURN.
  13911.  
  13912.           ## Usage:   4DOS allows subroutines in batch files.  A subroutine
  13913.                       begins with a label (a colon followed by a word) and
  13914.                       ends with a RETURN command.  The subroutine is invoked
  13915.                       with a GOSUB command from another part of the batch
  13916.                       file.  The RETURN command ends a subroutine; execution
  13917.                       of the batch file will continue with the command
  13918.                       following the original GOSUB.  GOSUB allows you to
  13919.                       create subroutines within a batch file (to call other
  13920.                       batch files, see CALL.)
  13921.  
  13922.                       The subroutine must start with a label that begins with
  13923.                       a colon [:] and which appears on a line by itself.
  13924.                       4DOS ignores case differences when matching labels.
  13925.  
  13926.                       The subroutine must end with a RETURN statement.  After
  13927.                       the RETURN, 4DOS will continue processing the batch
  13928.                       file with the command following the GOSUB command.
  13929.  
  13930.                       The following batch file fragment calls a subroutine
  13931.                       which displays the directory and returns:
  13932.  
  13933.                            echo Calling a subroutine
  13934.                            gosub subr1
  13935.                            echo Returned from the subroutine
  13936.                            quit
  13937.                            :subr1
  13938.                            dir /a/w
  13939.                            return
  13940.  
  13941.                       If the label doesn't exist, the batch file is
  13942.                       terminated with the error message "Label not found."
  13943.  
  13944.                       GOSUB saves the IFF state, so IFF statements inside a
  13945.                       subroutine won't interfere with IFF statements in the
  13946.                       part of the batch file from which the subroutine was
  13947.                       called.
  13948.  
  13949.  
  13950.  
  13951.           ___________________________________________________________________
  13952.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  237
  13953.  
  13954.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GOSUB
  13955.           ___________________________________________________________________
  13956.  
  13957.  
  13958.  
  13959.                       Subroutines can be nested.  The permissible nesting
  13960.                       level depends on the amount of free space in 4DOS's
  13961.                       internal stack.
  13962.  
  13963.                   ##  You may need to increase 4DOS's internal stack size
  13964.                       using the StackSize directive in 4DOS.INI if you use
  13965.                       extremely complex combinations of commands like EXCEPT,
  13966.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  13967.                       or use complex combinations of these commands in nested
  13968.                       batch files or nested GOSUBs.  See the StackSize
  13969.                       directive on page 140 for more information.
  13970.  
  13971.  
  13972.  
  13973.  
  13974.  
  13975.  
  13976.  
  13977.  
  13978.  
  13979.  
  13980.  
  13981.  
  13982.  
  13983.  
  13984.  
  13985.  
  13986.  
  13987.  
  13988.  
  13989.  
  13990.  
  13991.  
  13992.  
  13993.  
  13994.  
  13995.  
  13996.  
  13997.  
  13998.  
  13999.  
  14000.  
  14001.  
  14002.  
  14003.  
  14004.  
  14005.  
  14006.  
  14007.  
  14008.           ___________________________________________________________________
  14009.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  238
  14010.  
  14011.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GOTO
  14012.           ___________________________________________________________________
  14013.  
  14014.  
  14015.           GOTO                                                   (Compatible)
  14016.  
  14017.           Purpose:    Branch to a specified line inside the current batch
  14018.                       file.
  14019.  
  14020.           Format:     GOTO [/I] label
  14021.  
  14022.                       label:  The batch file line label to branch to.
  14023.  
  14024.                       /I(FF continues)
  14025.  
  14026.                       See also: GOSUB.
  14027.  
  14028.           Usage:      After a GOTO command in a batch file, the next line to
  14029.                       be executed will be the one immediately after the
  14030.                       label.  The label must begin with a colon [:] and
  14031.                       appear on a line by itself.  4DOS ignores case
  14032.                       differences when matching labels.
  14033.  
  14034.                       This batch file fragment checks for the existence of
  14035.                       the file CONFIG.SYS.  If the file exists, 4DOS jumps to
  14036.                       C_EXISTS and copies all the files from the current
  14037.                       directory to the root directory on A:.  Otherwise, 4DOS
  14038.                       prints an error message and exits.
  14039.  
  14040.                            if exist config.sys goto C_EXISTS
  14041.                            echo CONFIG.SYS doesn't exist - exiting.
  14042.                            quit
  14043.                            :C_EXISTS
  14044.                            copy *.* a:\
  14045.  
  14046.                       If the label doesn't exist, the batch file is
  14047.                       terminated with the error message "Label not found."
  14048.  
  14049.                       To avoid errors in the processing of nested IFF
  14050.                       statements, if /I is not used GOTO cancels all active
  14051.                       IFF statements.  This means that a normal GOTO (without
  14052.                       /I) inside an IFF statement must branch outside all IFF
  14053.                       statements, and  may not branch to any label that is
  14054.                       between an IFF and the corresponding ENDIFF.  This
  14055.                       includes branches inside the current IFF statement.
  14056.  
  14057.           Options:##  /I(FF continues):  Prevents GOTO from cancelling IFF
  14058.                       statements.  Use this option only if you are absolutely
  14059.                       certain that your GOTO command is branching entirely
  14060.                       within the current active IFF statement, and not into
  14061.                       another IFF statement or a different IFF nesting level.
  14062.  
  14063.  
  14064.  
  14065.           ___________________________________________________________________
  14066.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  239
  14067.  
  14068.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GOTO
  14069.           ___________________________________________________________________
  14070.  
  14071.  
  14072.                       Using /I under any other conditions will cause an error
  14073.                       later in your batch file.
  14074.  
  14075.  
  14076.  
  14077.  
  14078.  
  14079.  
  14080.  
  14081.  
  14082.  
  14083.  
  14084.  
  14085.  
  14086.  
  14087.  
  14088.  
  14089.  
  14090.  
  14091.  
  14092.  
  14093.  
  14094.  
  14095.  
  14096.  
  14097.  
  14098.  
  14099.  
  14100.  
  14101.  
  14102.  
  14103.  
  14104.  
  14105.  
  14106.  
  14107.  
  14108.  
  14109.  
  14110.  
  14111.  
  14112.  
  14113.  
  14114.  
  14115.  
  14116.  
  14117.  
  14118.  
  14119.  
  14120.  
  14121.  
  14122.           ___________________________________________________________________
  14123.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  240
  14124.  
  14125.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  HELP
  14126.           ___________________________________________________________________
  14127.  
  14128.  
  14129.           HELP                                        (New, External command)
  14130.  
  14131.           Purpose:    Display help for 4DOS and DOS commands.
  14132.  
  14133.           Format:     HELP [/M /Sn /X] [topic]
  14134.  
  14135.                       topic:  A help topic, 4DOS internal command, or DOS
  14136.                       external command.
  14137.  
  14138.                       /M(onochrome)               /X (disable mouse)
  14139.                       /Sn (set mouse speed)
  14140.  
  14141.           Usage:      HELP displays a brief description and the proper syntax
  14142.                       of both 4DOS and DOS commands.  If you simply type
  14143.  
  14144.                            c:\> help
  14145.  
  14146.                       you will see a list of all help topics.  You can select
  14147.                       a topic by using the cursor keys and then pressing
  14148.                       Enter.
  14149.  
  14150.                       If you want to avoid the opening list, use a topic or
  14151.                       command name.  For example, if you want help with the
  14152.                       4DOS COPY command, type
  14153.  
  14154.                            c:\> help copy
  14155.  
  14156.                       You can also start HELP by pressing F1 at the 4DOS
  14157.                       prompt (see page 63).
  14158.  
  14159.                       4HELP.EXE must be in the current directory or one of
  14160.                       the directories specified in the current PATH setting.
  14161.                       If you keep the help files in a directory which is not
  14162.                       on your PATH, you must set the full path for the help
  14163.                       program with the HelpPath directive in 4DOS.INI (see
  14164.                       page 126).  If you use the HelpPath directive, the HELP
  14165.                       command will generally respond more quickly, because
  14166.                       4DOS won't have to search the directories in your PATH
  14167.                       setting to find the help files.
  14168.  
  14169.                       The HELPCFG program included with 4DOS allows you to
  14170.                       customize the HELP colors.  To use it, just change to
  14171.                       your 4DOS directory, run HELPCFG, and follow the
  14172.                       instructions it displays.  To force HELPCFG to adjust
  14173.                       the monochrome HELP colors, even when running on a
  14174.                       color system, use the command HELPCFG /M.
  14175.  
  14176.  
  14177.  
  14178.  
  14179.           ___________________________________________________________________
  14180.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  241
  14181.  
  14182.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  HELP
  14183.           ___________________________________________________________________
  14184.  
  14185.  
  14186.  
  14187.                       If you use another program named HELP, you can use two
  14188.                       alias commands to rename the 4DOS help command as
  14189.                       4HELP:
  14190.  
  14191.                            c:\> alias 4help=`*help`
  14192.                            c:\> alias help=`c:\util\help.exe`
  14193.  
  14194.                       You can set options for HELP when your system boots
  14195.                       with the HelpOptions directive in 4DOS.INI (see page
  14196.                       126).
  14197.  
  14198.                       If you want to customize the help text (for example, to
  14199.                       add help for your own commands or aliases), you will
  14200.                       need the 4DOS Utility Disk which contains the source
  14201.                       text and hypertext compiler.
  14202.  
  14203.           Options:    /M(onochrome):  forces HELP to use a monochrome display
  14204.                       mode on color systems.  This is useful on any system
  14205.                       where HELP may be "fooled" into thinking you have a
  14206.                       color display when you don't, including portable
  14207.                       computers with LCD screens.
  14208.  
  14209.                       /Sn (Speed):  sets the HELP mouse movement speed.  /S0
  14210.                       sets the speed to one half the default speed, /S2 sets
  14211.                       it to twice the default, and /S4 sets it to four times
  14212.                       the default.  The larger values may be useful if you
  14213.                       normally use a screen size larger than the standard 80
  14214.                       x 25.
  14215.  
  14216.                       /X (disable mouse):  Completely disables the mouse in
  14217.                       HELP.  If you have a Microsoft serial or PS/2 mouse and
  14218.                       are experiencing long delays when HELP starts, you can
  14219.                       use this option to disable the mouse if you wish.  (The
  14220.                       delay is caused by the extended time required by the
  14221.                       Microsoft Mouse driver to initialize these mice.)
  14222.  
  14223.  
  14224.  
  14225.  
  14226.  
  14227.  
  14228.  
  14229.  
  14230.  
  14231.  
  14232.  
  14233.  
  14234.  
  14235.  
  14236.           ___________________________________________________________________
  14237.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  242
  14238.  
  14239.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  HISTORY
  14240.           ___________________________________________________________________
  14241.  
  14242.  
  14243.           HISTORY                                                       (New)
  14244.  
  14245.           Purpose:    Display, add to, clear, or read the history list.
  14246.  
  14247.           Format:     HISTORY [/A command /F /P /R filename]
  14248.  
  14249.                       /A(dd)                      /P(ause)
  14250.                       /F(ree)                     /R(ead)
  14251.  
  14252.                       See also: LOG
  14253.  
  14254.           Usage:      4DOS keeps a list of the commands you have entered on
  14255.                       the command line.  See page 56 for information on
  14256.                       command recall, which allows you to use the history
  14257.                       list to repeat or edit commands you have typed.
  14258.  
  14259.                       The HISTORY command lets you view and manipulate the
  14260.                       command history list directly.  If no parameters are
  14261.                       entered, HISTORY will display the current command
  14262.                       history list:
  14263.  
  14264.                            c:\> history
  14265.  
  14266.                       With the options explained below, you can clear the
  14267.                       list, add new commands to the list without executing
  14268.                       them, save the list in a file, or read a new list from
  14269.                       a file.
  14270.  
  14271.                       The number of commands saved in the history list
  14272.                       depends on the length of each command line.  The
  14273.                       history list size can be specified at startup from 256
  14274.                       to 8192 characters (see page 126).  The default size is
  14275.                       1024 characters.
  14276.  
  14277.                   ##  You can use the HISTORY command as an aid in writing
  14278.                       batch files.  Any time you have executed a series of
  14279.                       commands that you'd like to save as the basis for a
  14280.                       batch file, simply redirect the output of HISTORY to a
  14281.                       file:
  14282.  
  14283.                            c:\> history > newbatch
  14284.  
  14285.                       Then edit the output file to contain only the commands
  14286.                       you want in the batch file, and save it under the
  14287.                       appropriate name.  If you know you're going to use
  14288.                       HISTORY this way, you may want to use the /F switch to
  14289.                       clear the history first, so that your output file isn't
  14290.                       cluttered with too many extraneous commands.
  14291.  
  14292.  
  14293.           ___________________________________________________________________
  14294.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  243
  14295.  
  14296.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  HISTORY
  14297.           ___________________________________________________________________
  14298.  
  14299.  
  14300.  
  14301.                   ##  You can disable the history list or specify a minimum
  14302.                       command line length to save with the HistMin directive
  14303.                       in the 4DOS.INI file.
  14304.  
  14305.           Options:##  /A(dd):  Add a command to the history list.  This
  14306.                       performs the same function as the Ctrl-K key at the
  14307.                       command line (see page 56).
  14308.  
  14309.                       /F(ree):  Erase all entries in the command history
  14310.                       list.
  14311.  
  14312.                       /P(rompt):  Wait for a key after displaying each page
  14313.                       of the list.
  14314.  
  14315.                   ##  /R(ead):  Read the command history from the specified
  14316.                       file and append it to the history list currently held
  14317.                       in memory.  You can save the history list by
  14318.                       redirecting the output of HISTORY to a file.  This
  14319.                       example saves the command history to a file called
  14320.                       HISTFLE and reads it back again immediately.  If you
  14321.                       leave out the second line, 4DOS will append the
  14322.                       contents of the file to the current history list
  14323.                       instead of replacing the current history list with the
  14324.                       file copy:
  14325.  
  14326.                            c:\> history > histfile
  14327.                            c:\> history /f
  14328.                            c:\> history /r histfile
  14329.  
  14330.                       If you need to save your history at the end of each
  14331.                       day's work, you might use commands like this in your
  14332.                       AUTOEXEC.BAT file:
  14333.  
  14334.                            if exist c:\histfile history /r c:\histfile
  14335.                            alias shut*down `history > c:\histfile`
  14336.  
  14337.                       This restores the previous history list if it exists,
  14338.                       then defines an alias which will save the history
  14339.                       before shutting off the system.
  14340.  
  14341.  
  14342.  
  14343.  
  14344.  
  14345.  
  14346.  
  14347.  
  14348.  
  14349.  
  14350.           ___________________________________________________________________
  14351.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  244
  14352.  
  14353.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14354.           ___________________________________________________________________
  14355.  
  14356.  
  14357.           IF                                                       (Enhanced)
  14358.  
  14359.           Purpose:    Execute a command if a condition or set of conditions
  14360.                       is true.
  14361.  
  14362.           Format:     IF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  14363.                            condition ...] command
  14364.  
  14365.                       condition:  A test to determine if the command should
  14366.                       be executed.
  14367.                       command:  The command to execute if the condition is
  14368.                       true.
  14369.  
  14370.                       See also: IFF.
  14371.  
  14372.           Usage:      IF is normally used only in aliases and batch files.
  14373.                       It is always followed by one or more conditions and
  14374.                       then a command.  4DOS first evaluates the conditions.
  14375.                       If they are true, 4DOS executes the command.
  14376.                       Otherwise, the command is ignored.  If you add a NOT
  14377.                       before a condition, the command is executed only when
  14378.                       the condition is false.
  14379.  
  14380.                       You can link conditions with .AND., .OR., or .XOR., and
  14381.                       you can nest IF statements.  The conditions can test
  14382.                       strings, numbers, the existence of a file or
  14383.                       subdirectory, the errorlevel returned from the
  14384.                       preceding external command, and the existence of alias
  14385.                       names and internal commands.
  14386.  
  14387.                       The command can be an alias, a 4DOS internal command,
  14388.                       an external command, or a batch file.  The entire IF
  14389.                       statement, including all conditions and the command,
  14390.                       must fit on one line.
  14391.  
  14392.                   ##  You can use command grouping (see page 92) to execute
  14393.                       multiple commands if the condition is true.  For
  14394.                       example, the following command tests if any .TXT files
  14395.                       exist.  If they do, they are copied to drive A: and
  14396.                       their extensions are changed to .TXO:
  14397.  
  14398.                            if exist *.txt (copy *.txt a: ^ ren *.txt *.txo)
  14399.  
  14400.                       (The IFF command provides a more structured method of
  14401.                       executing multiple commands if a condition or set of
  14402.                       conditions is true.)
  14403.  
  14404.  
  14405.  
  14406.  
  14407.           ___________________________________________________________________
  14408.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  245
  14409.  
  14410.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14411.           ___________________________________________________________________
  14412.  
  14413.  
  14414.  
  14415.                   ##  You may need to increase 4DOS's internal stack size
  14416.                       using the StackSize directive in 4DOS.INI if you use
  14417.                       extremely complex combinations of commands like EXCEPT,
  14418.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  14419.                       or use complex combinations of these commands in nested
  14420.                       batch files or nested GOSUBs.  See the StackSize
  14421.                       directive on page 140 for more information.
  14422.  
  14423.           Conditions: The following conditional tests are available in both
  14424.                       the IF and IFF commands.  They fit into three
  14425.                       categories: string tests, numeric tests, and system
  14426.                       tests.  The tests can use environment variables, 4DOS
  14427.                       internal-variables and variable functions (see pages 81
  14428.                       and 86), file names, and literal text and values as
  14429.                       their arguments.
  14430.  
  14431.                       Spaces are required on either side of the condition in
  14432.                       all cases except ==, which will work with or without
  14433.                       spaces around it.
  14434.  
  14435.                       If you use one of the string or numeric tests like ==
  14436.                       or GE, 4DOS decides whether to compare the values as
  14437.                       numbers or as strings by examining the first character
  14438.                       of each value.  If both values begin with a digit, 4DOS
  14439.                       performs a numeric comparison.  If either value does
  14440.                       not begin with a digit, a string comparison is done.
  14441.                       To force a string comparison, use double quotes around
  14442.                       the values you are testing.
  14443.  
  14444.                       The difference between numeric and string comparisons
  14445.                       is best explained by looking at the way values with and
  14446.                       without blanks are tested.  For example, consider
  14447.                       comparing the values 2 and 19.  Numerically, 2 is
  14448.                       smaller, but as a string it is "larger" because its
  14449.                       first digit is larger than the first digit of 19.  So
  14450.                       the first of these conditions will be true, and the
  14451.                       second will be false:
  14452.  
  14453.                            if 2 lt 19 ...
  14454.                            if "2" lt "19" ...
  14455.  
  14456.                       String Tests:
  14457.  
  14458.                         For the string tests, 4DOS ignores case differences.
  14459.                         When you compare strings, you should always enclose
  14460.                         the arguments in double quotes in order to avoid
  14461.  
  14462.  
  14463.  
  14464.           ___________________________________________________________________
  14465.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  246
  14466.  
  14467.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14468.           ___________________________________________________________________
  14469.  
  14470.  
  14471.                         syntax errors which may occur if one of the argument
  14472.                         values is empty.
  14473.  
  14474.                         string1 == string2
  14475.  
  14476.                         string1 EQ string2
  14477.  
  14478.                            If string1 is equal to string2, then the
  14479.                            condition is true.
  14480.  
  14481.                         string1 != string2
  14482.                         string1 NE string2
  14483.  
  14484.                            If string1 is not equal to string 2, then the
  14485.                            condition is true.
  14486.  
  14487.                         string1 LT string2
  14488.  
  14489.                            If string1 is less than string2, then the
  14490.                            condition is true.
  14491.  
  14492.                         string1 LE string2
  14493.  
  14494.                            If string1 is less than or equal to string2, then
  14495.                            the condition is true.
  14496.  
  14497.                         string1 GT string2
  14498.  
  14499.                            If string1 is greater than string2, then the
  14500.                            condition is true.
  14501.  
  14502.                         string1 GE string2
  14503.  
  14504.                            If string1 is greater than or equal to string2,
  14505.                            then the condition is true.
  14506.  
  14507.                         This first batch file fragment runs a program called
  14508.                         MONOPROG if a monochrome monitor is attached to the
  14509.                         system:
  14510.  
  14511.                                 if "%_monitor" == "mono" monoprog
  14512.  
  14513.                         The second batch file fragment tests for a string
  14514.                         value:
  14515.  
  14516.                                 input "Enter your selection : " %%cmd
  14517.                                 if "%cmd" == "WP" goto wordproc
  14518.                                 if "%cmd" NE "GRAPHICS" goto badentry
  14519.  
  14520.  
  14521.           ___________________________________________________________________
  14522.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  247
  14523.  
  14524.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14525.           ___________________________________________________________________
  14526.  
  14527.  
  14528.  
  14529.                         This example calls GO.BTM if the first two
  14530.                         characters of the file MYFILE contain the string
  14531.                         "GO" (enter this example on one line):
  14532.  
  14533.                                 if "%@substr[%@line[myfile,0],0,2]"=="GO"
  14534.                                 call go.btm
  14535.  
  14536.                       Numeric Tests:
  14537.  
  14538.                         The numeric tests available are exactly the same as
  14539.                         the string tests (==, EQ, !=, NE, LT, LE, GT, and
  14540.                         GE), but compare values as numbers instead of
  14541.                         strings.  Both values must begin with a digit or
  14542.                         4DOS will perform a string test instead.
  14543.  
  14544.                         The first example below tests whether there is more
  14545.                         than 500 KBytes of free base memory; the second
  14546.                         tests for  more than 2 MBytes of free EMS memory:
  14547.  
  14548.                               c:\> if %@dosmem[k] gt 500 echo Over 500K free
  14549.                               c:\> if %@ems[m] gt 2 echo Over 2 MB EMS free
  14550.  
  14551.                         This example shows how to implement a simple loop
  14552.                         inside a batch file.  The lines between the labels
  14553.                         :loop and :loopdone will be executed 100 times:
  14554.  
  14555.                                 set limit=100
  14556.                                 set counter=1
  14557.                                 :loop
  14558.                                 if %counter gt %limit goto loopdone
  14559.                                   rem DO SOME WORK HERE
  14560.                                   set counter=%@eval[%counter + 1]
  14561.                                   goto loop
  14562.                                 :loopdone
  14563.  
  14564.                       System Tests:
  14565.  
  14566.                         The final conditions test the system status.  You
  14567.                         can also use 4DOS pseudo-variables and variable
  14568.                         functions to test other parts of the system status.
  14569.  
  14570.                         ERRORLEVEL [condition] n
  14571.  
  14572.                            This test retrieves the exit code of the
  14573.                            preceding external program.  By convention,
  14574.                            programs return an exit code of 0 when they are
  14575.                            successful and a number between 1 and 255 to
  14576.  
  14577.  
  14578.           ___________________________________________________________________
  14579.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  248
  14580.  
  14581.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14582.           ___________________________________________________________________
  14583.  
  14584.  
  14585.                            indicate an error.  The condition can be any of
  14586.                            the numeric operators listed above (EQ, !=, GT,
  14587.                            etc.).  If no relational operator is specified,
  14588.                            the default is GE.  The comparison between the
  14589.                            exit code and n is done numerically.
  14590.  
  14591.                            Not all programs return an explicit exit code.
  14592.                            For programs which do not, the behavior of
  14593.                            ERRORLEVEL is undefined and may be erratic.
  14594.  
  14595.                         EXIST filename
  14596.  
  14597.                            If the file exists, the condition is true.  You
  14598.                            can use wildcards in the filename, in which case
  14599.                            the condition is true if any file matching the
  14600.                            wildcards exists.
  14601.  
  14602.                         ISALIAS aliasname
  14603.  
  14604.                            If the specified name is an alias, the condition
  14605.                            is true.
  14606.  
  14607.                         [ISDIR | DIREXIST] path
  14608.  
  14609.                            If the subdirectory exists, the condition is
  14610.                            true.  For compatibility with DR-DOS, DIREXIST
  14611.                            may be used as a synonym for ISDIR.
  14612.  
  14613.                         ISINTERNAL command
  14614.  
  14615.                            If the specified command is an active, internal
  14616.                            4DOS command, the condition is true.  Commands
  14617.                            can be activated and deactivated with the SETDOS
  14618.                            /I command.
  14619.  
  14620.                         The first batch file fragment below tests for the
  14621.                         existence of A:\JAN.DOC before copying it to drive
  14622.                         C.
  14623.  
  14624.                                 if exist a:\jan.doc copy a:\jan.doc c:\
  14625.  
  14626.                         This example tests the exit code of the previous
  14627.                         program and stops batch file processing if an error
  14628.                         occurred:
  14629.  
  14630.                                 if errorlevel==0 goto success
  14631.                                 echo "External Error -- Batch File Ends!"
  14632.                                 cancel
  14633.  
  14634.  
  14635.           ___________________________________________________________________
  14636.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  249
  14637.  
  14638.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14639.           ___________________________________________________________________
  14640.  
  14641.  
  14642.  
  14643.                       Combining Tests:
  14644.  
  14645.                         You can negate the result of any test with NOT, and
  14646.                         combine tests of any sort with .AND., .OR., and
  14647.                         .XOR.  Test conditions are always scanned from left
  14648.                         to right -- there is no implied order of precedence,
  14649.                         as there is in some programming languages.
  14650.  
  14651.                         When two tests are combined with .AND., the result
  14652.                         is true if both of the individual tests are true.
  14653.                         When two tests are combined with .OR., the result is
  14654.                         true if either (or both) of the individual tests are
  14655.                         true.  When two tests are combined with .XOR., the
  14656.                         result is true only if one of the tests is true and
  14657.                         the other is false.
  14658.  
  14659.                         This example runs a program called HIGHRES if either
  14660.                         an EGA or VGA video adapter is in use:
  14661.  
  14662.                               if "%_video"=="EGA" .or. "%_video"==vga highres
  14663.  
  14664.  
  14665.  
  14666.  
  14667.  
  14668.  
  14669.  
  14670.  
  14671.  
  14672.  
  14673.  
  14674.  
  14675.  
  14676.  
  14677.  
  14678.  
  14679.  
  14680.  
  14681.  
  14682.  
  14683.  
  14684.  
  14685.  
  14686.  
  14687.  
  14688.  
  14689.  
  14690.  
  14691.  
  14692.           ___________________________________________________________________
  14693.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  250
  14694.  
  14695.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IFF
  14696.           ___________________________________________________________________
  14697.  
  14698.  
  14699.           IFF                                                           (New)
  14700.  
  14701.           Purpose:    Allow IF / THEN / ELSE conditional execution of
  14702.                       commands.
  14703.  
  14704.           Format:     IFF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  14705.                          condition ...] THEN ^ commands
  14706.                       [ELSEIFF condition  THEN ^ commands ] ...
  14707.                       [ELSE ^ commands ]
  14708.                       ^ ENDIFF
  14709.  
  14710.                       condition:  A test to determine if the command(s)
  14711.                       should be executed.
  14712.                       commands:  One or more commands to execute if the
  14713.                       condition(s) is true.  If you use multiple commands,
  14714.                       they must be separated by carets or be placed on
  14715.                       separate lines of a batch file.
  14716.  
  14717.                       See also: IF
  14718.  
  14719.           Usage:      IFF is similar to the IF command, except that it can
  14720.                       perform one set of commands when a condition or set of
  14721.                       conditions is true and different commands when the
  14722.                       conditions are false.
  14723.  
  14724.                       IFF can execute multiple commands when the conditions
  14725.                       are true or false; IF normally executes only one
  14726.                       command.  IFF imposes no limit on the number of
  14727.                       commands and is generally a "cleaner" and more
  14728.                       structured command than IF.
  14729.  
  14730.                       IFF is always followed by one or more conditions, which
  14731.                       4DOS evaluates.  If they are true, 4DOS executes the
  14732.                       commands that follow the word THEN.  Additional
  14733.                       conditions can be tested with ELSEIFF.  If none of
  14734.                       these conditions are true, 4DOS executes the commands
  14735.                       that follow the word ELSE.  In both cases, after the
  14736.                       selected commands are executed, processing continues
  14737.                       after the word ENDIFF.
  14738.  
  14739.                       If you add a NOT before the condition, the THEN
  14740.                       commands are executed only when the condition is false
  14741.                       and the ELSE commands are executed only when the
  14742.                       condition is true.
  14743.  
  14744.                       You can link conditions with .AND., .OR., or .XOR., and
  14745.                       you can nest IFF statements up to 15 deep.  The
  14746.                       conditions can test strings or numbers, the existence
  14747.  
  14748.  
  14749.           ___________________________________________________________________
  14750.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  251
  14751.  
  14752.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IFF
  14753.           ___________________________________________________________________
  14754.  
  14755.  
  14756.                       of a file or subdirectory, the errorlevel returned from
  14757.                       the preceding external command, and the existence of
  14758.                       alias names and internal commands.
  14759.  
  14760.                       See the IF command for a list of the possible
  14761.                       conditions.
  14762.  
  14763.                       The commands can include any 4DOS internal command or
  14764.                       alias, external command, or batch file.
  14765.  
  14766.                       The following batch file fragment tests the monitor
  14767.                       type (monochrome or color), and sets the appropriate
  14768.                       colors and prompt (enter the "prompt" lines on one line
  14769.                       of the batch file):
  14770.  
  14771.                            iff "%_monitor" == "color" then
  14772.                              color bright white on blue ^ cls
  14773.                              prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path:
  14774.                                 $p$e[u$e[44;37m$n$g
  14775.                            else
  14776.                              prompt=$e[s$e[1;1f$e[0;7m$e[K  Path:
  14777.                                 $p$e[u$e[0m$n$g
  14778.                            endiff
  14779.  
  14780.                       The alias in this second example checks to see if the
  14781.                       argument is a subdirectory.  If so, the alias deletes
  14782.                       the subdirectory's files and removes it (enter this on
  14783.                       one line):
  14784.  
  14785.                            c:\> alias prune `iff isdir %1 then ^
  14786.                                 del /sxz %1 ^ rd %1 ^ else ^
  14787.                                 echo Not a directory!^endiff`
  14788.  
  14789.                   ##  If you do a GOTO inside an IFF, 4DOS normally assumes
  14790.                       you are jumping outside of all active IFF statements.
  14791.                       If you attempt to GOTO another part of the same IFF,
  14792.                       the middle of another IFF, or a different IFF nesting
  14793.                       level, you will eventually receive an "unknown command"
  14794.                       error on a subsequent ELSE, ELSEIFF, or ENDIFF
  14795.                       statement.  You can override this restriction with GOTO
  14796.                       /I, but do so only if you are absolutely certain that
  14797.                       your GOTO command is branching entirely within the
  14798.                       current active IFF statement.  Using /I under any other
  14799.                       conditions will cause an error later in your batch
  14800.                       file.
  14801.  
  14802.  
  14803.  
  14804.  
  14805.  
  14806.           ___________________________________________________________________
  14807.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  252
  14808.  
  14809.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  INKEY
  14810.           ___________________________________________________________________
  14811.  
  14812.  
  14813.           INKEY                                                         (New)
  14814.  
  14815.           Purpose:    Get a single keystroke from the user and store it in an
  14816.                       environment variable.
  14817.  
  14818.           Format:     INKEY [/K"keys" /Wn] [prompt] %%varname
  14819.  
  14820.                       prompt:  Optional text that is displayed as a prompt.
  14821.                       varname:  The variable that will hold the user's
  14822.                       keystroke.
  14823.  
  14824.                       /K (valid keystrokes)       /W(ait)
  14825.  
  14826.                       See also: INPUT and KEYSTACK.
  14827.  
  14828.           Usage:      INKEY optionally displays a prompt for user input.
  14829.                       Then it waits for a specified time or indefinitely for
  14830.                       a keystroke, and places the keystroke into an
  14831.                       environment variable.  It is normally used in batch
  14832.                       files and aliases to get a menu choice or other single-
  14833.                       key input from the user.  Along with the INPUT command,
  14834.                       INKEY allows great flexibility in reading user input
  14835.                       from within a batch file or alias.
  14836.  
  14837.                       If prompt text is included in an INKEY command, it is
  14838.                       displayed while INKEY waits for input.
  14839.  
  14840.                       The following batch file fragment prompts for a
  14841.                       character and stores it in the variable NUM:
  14842.  
  14843.                            inkey Enter a number from 1 to 9:  %%num
  14844.  
  14845.                       INKEY reads standard input for the keystroke, so it
  14846.                       will accept keystrokes from a redirected file or from
  14847.                       the KEYSTACK.  You can supply a list of valid
  14848.                       keystrokes with the /K option.
  14849.  
  14850.                       Standard keystrokes with ASCII values between 1 and 255
  14851.                       are stored directly in the environment variable.
  14852.                       Extended keystrokes (for example, function keys and
  14853.                       cursor keys) are stored as a string in decimal format,
  14854.                       with a leading @ (for example, the F1 key is @59).  The
  14855.                       Enter key is stored as an extended keystroke, with the
  14856.                       code @28.  See Appendix B (page 334) for a list of the
  14857.                       ASCII and extended key codes.
  14858.  
  14859.                       If you press Ctrl-C or Ctrl-BREAK while INKEY is
  14860.                       waiting for a key, execution of an alias will be
  14861.  
  14862.  
  14863.           ___________________________________________________________________
  14864.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  253
  14865.  
  14866.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  INKEY
  14867.           ___________________________________________________________________
  14868.  
  14869.  
  14870.                       terminated, and execution of a batch file will be
  14871.                       suspended while you are asked whether to cancel the
  14872.                       batch job.
  14873.  
  14874.           Options:    /K:  Specify the permissible keystrokes.  The list of
  14875.                       valid keystrokes should be enclosed in double quotes
  14876.                       ["keys"].  For alphabetic keys the validity test is not
  14877.                       case-sensitive.  You can specify extended keys by
  14878.                       enclosing their names in square brackets (within the
  14879.                       quotes), for example:
  14880.  
  14881.                            inkey /k"ab[Alt-F10]" Enter A, B, or Alt-F10
  14882.                            %%var
  14883.  
  14884.                       If an invalid keystroke is entered 4DOS will echo the
  14885.                       keystroke if possible, beep, move the cursor back one
  14886.                       character, and wait for another keystroke.
  14887.  
  14888.                       Key names within square brackets are entered in the
  14889.                       form:
  14890.  
  14891.                            Prefix-Keyname
  14892.  
  14893.                       The key prefix is optional, and can be any one of the
  14894.                       following:
  14895.  
  14896.                         Alt        followed by A - Z, 0 - 9, F1 - F12, or
  14897.                                    Bksp
  14898.                         Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  14899.                                    Left, Right, Home, End, PgUp, PgDn, Ins,
  14900.                                    or Del
  14901.                         Shift      followed by F1 - F12 or Tab.
  14902.  
  14903.                       The possible key names are:
  14904.  
  14905.                         A - Z         Enter         PgDn
  14906.                         0 - 9         Up            Home
  14907.                         F1 - F12      Down          End
  14908.                         Esc           Left          Ins
  14909.                         Bksp          Right         Del
  14910.                         Tab           PgUp
  14911.  
  14912.                       All key names must be spelled as shown, and can be
  14913.                       abbreviated as long as the abbreviation is unique and
  14914.                       unambiguous.  The prefix must be separated from the key
  14915.                       name with a dash.
  14916.  
  14917.  
  14918.  
  14919.  
  14920.           ___________________________________________________________________
  14921.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  254
  14922.  
  14923.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  INKEY
  14924.           ___________________________________________________________________
  14925.  
  14926.  
  14927.  
  14928.                       /W(ait):  Timeout period,  in seconds, to wait for a
  14929.                       response.  If no keystroke is entered by the end of the
  14930.                       timeout period, INKEY returns with the variable
  14931.                       unchanged.  You can specify /W0 to return immediately
  14932.                       if there are no keys waiting in the keyboard buffer.
  14933.  
  14934.                       For example, the following batch file fragment waits up
  14935.                       to 10 seconds for a character, then tests to see if a
  14936.                       "Y" was entered:
  14937.  
  14938.                            set net=N
  14939.                            inkey /K"YN" /w10 Load the network (Y/N)?  %%net
  14940.                            iff "%net" == "Y" then
  14941.                              rem Commands to load the network go here
  14942.                            endiff
  14943.  
  14944.  
  14945.  
  14946.  
  14947.  
  14948.  
  14949.  
  14950.  
  14951.  
  14952.  
  14953.  
  14954.  
  14955.  
  14956.  
  14957.  
  14958.  
  14959.  
  14960.  
  14961.  
  14962.  
  14963.  
  14964.  
  14965.  
  14966.  
  14967.  
  14968.  
  14969.  
  14970.  
  14971.  
  14972.  
  14973.  
  14974.  
  14975.  
  14976.  
  14977.           ___________________________________________________________________
  14978.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  255
  14979.  
  14980.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  INPUT
  14981.           ___________________________________________________________________
  14982.  
  14983.  
  14984.           INPUT                                                         (New)
  14985.  
  14986.           Purpose:    Get a string from the keyboard and save it in an
  14987.                       environment variable.
  14988.  
  14989.           Format:     INPUT [/Wn] [prompt] %%varname
  14990.  
  14991.                       prompt:  Optional text that is displayed as a prompt.
  14992.                       varname:  The variable that will hold the user's input.
  14993.  
  14994.                       /W(ait)
  14995.  
  14996.                       See also: INKEY and KEYSTACK.
  14997.  
  14998.           Usage:      INPUT optionally displays a prompt for user input.
  14999.                       Then it waits for a specified time or indefinitely for
  15000.                       the user's entry.  It places any characters typed by
  15001.                       the user into an environment variable.  INPUT is
  15002.                       normally used in batch files and aliases to get multi-
  15003.                       key input from the user.  Along with the INKEY command,
  15004.                       INPUT allows great flexibility in reading user input
  15005.                       from within a batch file or alias.
  15006.  
  15007.                       If prompt text is included in an INPUT command, it is
  15008.                       displayed while INPUT waits for input.  Standard 4DOS
  15009.                       command line editing keys may be used to edit the input
  15010.                       string as it is entered.
  15011.  
  15012.                       All characters entered up to, but not including, the
  15013.                       carriage return are stored in the variable.
  15014.  
  15015.                       The following batch file fragment prompts for a string
  15016.                       and stores it in the variable FNAME:
  15017.  
  15018.                            input Enter the file name:  %%fname
  15019.  
  15020.                       INPUT reads standard input, so it will accept text from
  15021.                       a re-directed file or from the KEYSTACK.
  15022.  
  15023.           Option:     /W(ait):  Timeout period,  in seconds, to wait for a
  15024.                       response.  If no keystroke is entered by the end of the
  15025.                       timeout period, INPUT returns with the variable
  15026.                       unchanged.  If you enter a key before the timeout
  15027.                       period, INPUT will wait indefinitely for the remainder
  15028.                       of the line.  You can specify /W0 to return immediately
  15029.                       if there are no keys waiting in the keyboard buffer.
  15030.  
  15031.  
  15032.  
  15033.  
  15034.           ___________________________________________________________________
  15035.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  256
  15036.  
  15037.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  KEYSTACK
  15038.           ___________________________________________________________________
  15039.  
  15040.  
  15041.           KEYSTACK                                                      (New)
  15042.  
  15043.           Purpose:    Feed keystrokes to a program or command automatically.
  15044.  
  15045.           Format:     KEYSTACK [/Wn] ["abc"] [keyname] [!] ...
  15046.  
  15047.                       "abc":  Literal characters to be placed in the
  15048.                       Keystack.
  15049.                       keyname:  Name or code for a key to be placed in the
  15050.                       Keystack.
  15051.                       !:  Signal to clear the Keystack and the keyboard
  15052.                       buffer.
  15053.  
  15054.                       /W(ait)
  15055.  
  15056.           Usage:      KEYSTACK takes a series of keystrokes and feeds them to
  15057.                       a program or command as if they were typed at the
  15058.                       keyboard.  When the program has used all of the
  15059.                       keystrokes in the keystack buffer, it will begin to
  15060.                       read the keyboard for input, as it normally would.
  15061.  
  15062.                       KEYSTACK will only work if the memory-resident program
  15063.                       KSTACK.COM has been loaded.  KSTACK is usually loaded
  15064.                       from the AUTOEXEC.BAT file (see page 116).  It can also
  15065.                       be loaded with an INSTALL= directive in CONFIG.SYS if
  15066.                       you wish and your version of DOS supports INSTALL= (see
  15067.                       your DOS manual for details).  If KSTACK is not loaded
  15068.                       the KEYSTACK command will display an error message.  If
  15069.                       you are using a multitasking system such as DESQview or
  15070.                       Windows, see page 155 for information on loading KSTACK
  15071.                       within a window.
  15072.  
  15073.                       Characters entered within double quotes ("abc") will be
  15074.                       stored "as is" in the keyboard buffer.  The only items
  15075.                       allowed outside double quotes are key names, key codes,
  15076.                       and the /W option.
  15077.  
  15078.                       Key names are entered in the form:
  15079.  
  15080.                            [Prefix-]Keyname
  15081.  
  15082.                       The key prefix can be left out, in which case any of
  15083.                       the key names can be used except A - Z or 0 - 9.  If
  15084.                       the key prefix is used it can be any one of the
  15085.                       following:
  15086.  
  15087.                         Alt        followed by A - Z, 0 - 9, F1 - F12, or
  15088.                                    Bksp
  15089.  
  15090.  
  15091.           ___________________________________________________________________
  15092.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  257
  15093.  
  15094.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  KEYSTACK
  15095.           ___________________________________________________________________
  15096.  
  15097.  
  15098.                         Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  15099.                                    Left, Right, Home, End, PgUp, PgDn, Ins,
  15100.                                    or Del
  15101.                         Shift      followed by F1 - F12 or Tab.
  15102.  
  15103.                       The possible key names are:
  15104.  
  15105.                         A - Z         Enter         PgDn
  15106.                         0 - 9         Up            Home
  15107.                         F1 - F12      Down          End
  15108.                         Esc           Left          Ins
  15109.                         Bksp          Right         Del
  15110.                         Tab           PgUp
  15111.  
  15112.                       All key names must be spelled as shown, and can be
  15113.                       abbreviated as long as the abbreviation is unique and
  15114.                       unambiguous.
  15115.  
  15116.                       The prefix and key name must be separated by a dash.
  15117.                       For example,
  15118.  
  15119.                            Alt-F10        This is okay
  15120.                            Alt F10        The space will cause an error
  15121.  
  15122.                       If you prefer, you can use a numeric value instead of a
  15123.                       key name.  Use the ASCII code for an ASCII, extended
  15124.                       ASCII, or control character.  Use the scan code
  15125.                       preceded by an at-sign [@] for extended key codes like
  15126.                       F1 or the cursor keys.  In general, you will find it
  15127.                       easier to use the names described above rather than key
  15128.                       numbers.  See Appendix B (page 334) for an explanation
  15129.                       and list of keyboard codes.
  15130.  
  15131.                       An exclamation mark [!] will clear all pending
  15132.                       keystrokes, both in the KEYSTACK buffer and in the
  15133.                       keyboard buffer.
  15134.  
  15135.                       For example, to start ProComm Plus and skip the opening
  15136.                       screen you could use the command:
  15137.  
  15138.                            c:\comm> keystack 32 ^ pcplus
  15139.  
  15140.                       This places a space (ASCII code 32) in the buffer, then
  15141.                       runs ProComm Plus.  When ProComm looks for a keystroke
  15142.                       to end the display of the opening screen the keystroke
  15143.                       is already in the buffer, so the opening screen is
  15144.                       removed immediately.
  15145.  
  15146.  
  15147.  
  15148.           ___________________________________________________________________
  15149.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  258
  15150.  
  15151.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  KEYSTACK
  15152.           ___________________________________________________________________
  15153.  
  15154.  
  15155.  
  15156.                       The KEYSTACK command must be executed before running
  15157.                       the program which is going to receive the stacked
  15158.                       keystrokes.  This places the keystrokes into the buffer
  15159.                       first, so the program can find them when it runs.
  15160.  
  15161.                       You can store a maximum of 255 characters in the
  15162.                       KEYSTACK buffer.  Each time the KEYSTACK command is
  15163.                       executed, it will clear any remaining keystrokes stored
  15164.                       by a previous KEYSTACK command.
  15165.  
  15166.                       You may need to experiment with your programs and
  15167.                       insert delays (see the /W option) to find a keystroke
  15168.                       sequence that works for any particular program.
  15169.  
  15170.                       Programs that bypass DOS and the BIOS for keyboard
  15171.                       input cannot read keystrokes entered with KEYSTACK.  If
  15172.                       you use KEYSTACK then run such a program, the
  15173.                       keystrokes will not appear in the program, but may
  15174.                       appear at the prompt when you exit the program and
  15175.                       return to 4DOS.
  15176.  
  15177.                   ##  KEYSTACK treats the number 0 as a special case; it is
  15178.                       used with programs that flush the keyboard buffer.
  15179.                       When KEYSTACK processes a key value of 0, it tells the
  15180.                       program the buffer is clear, so subsequent keystrokes
  15181.                       will be accepted normally.  Some programs will require
  15182.                       several "0"s before they will accept input; you may
  15183.                       need to experiment to determine the correct number.
  15184.  
  15185.                       For example, the following batch file starts Lotus 1-2-
  15186.                       3 and loads the file specified on the command line when
  15187.                       the batch file is invoked (the KEYSTACK command should
  15188.                       be entered on one line):
  15189.  
  15190.                            pushd c:\123
  15191.                            keystack 0 Enter 0 Enter 0 Enter 0 Enter 0 Enter
  15192.                              "/FR" 0 "%1" Enter
  15193.                            123
  15194.                            popd
  15195.  
  15196.                       The sequence of "0 Enter" pairs tells 1-2-3 that the
  15197.                       keyboard buffer is empty, then passes 1-2-3 a carriage
  15198.                       return, repeating this sequence five times.  This gets
  15199.                       1-2-3 to a point where an empty spreadsheet is
  15200.                       displayed.  The rest of the KEYSTACK line issues a File
  15201.                       Retrieve command (/FR), simulates an empty keyboard
  15202.                       buffer once more, enters the file name passed on the
  15203.  
  15204.  
  15205.           ___________________________________________________________________
  15206.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  259
  15207.  
  15208.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  KEYSTACK
  15209.           ___________________________________________________________________
  15210.  
  15211.  
  15212.                       batch command line (%1), and finally enters a carriage
  15213.                       return to end the file name.
  15214.  
  15215.                   ##  Here's the same command defined as an alias (enter this
  15216.                       on one line):
  15217.  
  15218.                            alias 321 `pushd c:\123 ^ keystack 0 Enter 0
  15219.                            Enter 0 Enter 0 Enter 0 Enter "/FR" 0 "%1" 13 ^
  15220.                            123 ^ popd`
  15221.  
  15222.                   ##  Some programs require both the keyboard "scan code" and
  15223.                       the ASCII value to be stacked.  To stack both codes,
  15224.                       calculate the value ((256 * scan code) + ASCII code)
  15225.                       and enter that numeric value as an argument for
  15226.                       KEYSTACK.  For example, for the Enter key, the scan
  15227.                       code is 28 and the ASCII code is 13, so to stack both
  15228.                       values use ((256 * 28) + 13) or KEYSTACK 7181.  Try
  15229.                       this approach if a "normal" KEYSTACK command does not
  15230.                       work (for example, if you use KEYSTACK 13 for the Enter
  15231.                       key and the program doesn't see the correct character).
  15232.                       To stack combined key codes you must use the numeric
  15233.                       value, not the key name (see Appendix B on page 334 for
  15234.                       keyboard codes).
  15235.  
  15236.           Options:##  /W(ait):  Delay the next keystroke in the KEYSTACK
  15237.                       buffer by a specified number of clock "ticks".  A clock
  15238.                       tick is approximately 1/18 second.  The number of clock
  15239.                       ticks to delay should be placed immediately after the
  15240.                       W, and must be between 1 and 65535 (65535 ticks is
  15241.                       about 1 hour).  You can use the /W option as many times
  15242.                       as desired and at any point in the string of keystrokes
  15243.                       except within double quotes.  Some programs may need
  15244.                       the delays provided by /W in order to receive
  15245.                       keystrokes properly from KEYSTACK.  The only way to
  15246.                       determine what delay is needed is to experiment.
  15247.                       Sometimes a combination of a delay and an "empty
  15248.                       buffer" signal (a 0) are required.  For example, to
  15249.                       start the program CADX and send it an F7, a delay of
  15250.                       one second, an indication that the keyboard buffer is
  15251.                       empty, and a carriage return:
  15252.  
  15253.                            c:\> keystack F7 /W18 0 Enter ^ cadx
  15254.  
  15255.  
  15256.  
  15257.  
  15258.  
  15259.  
  15260.  
  15261.  
  15262.           ___________________________________________________________________
  15263.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  260
  15264.  
  15265.                         CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LH / LOADHIGH
  15266.           ___________________________________________________________________
  15267.  
  15268.  
  15269.           LH / LOADHIGH                                          (Compatible)
  15270.  
  15271.           Purpose:    Load a memory resident program into an Upper Memory
  15272.                       Block (UMB).
  15273.  
  15274.           Format:     LH filename
  15275.                            or
  15276.                       LOADHIGH filename
  15277.  
  15278.                       filename:  The name of the program to load into high
  15279.                       memory.
  15280.  
  15281.           Usage:      LH and LOADHIGH are synonyms.  You can use either one.
  15282.  
  15283.                       LOADHIGH requires MS-DOS 5.0 or above.
  15284.  
  15285.                       If you load memory-resident programs into UMBs, you
  15286.                       will have more room in base memory for application
  15287.                       programs.  If your system has no UMBs, or if the
  15288.                       program is larger than the largest UMB, then LOADHIGH
  15289.                       will load the program into conventional base memory.
  15290.  
  15291.                       For example, to load the program C:\UTIL\CACHE.EXE into
  15292.                       high memory:
  15293.  
  15294.                            c:\> loadhigh c:\util\cache.exe
  15295.  
  15296.                       In addition to MS-DOS 5.0 or above, LOADHIGH requires
  15297.                       the DOS=UMB command in your CONFIG.SYS file.  It can
  15298.                       only be used to load programs into UMBs managed by MS-
  15299.                       DOS 5.0 and above.
  15300.  
  15301.                       If you use a memory manager like 386MAX or QEMM to
  15302.                       manage your UMBs, rather than the MS-DOS DOS=UMB
  15303.                       directive, then LOADHIGH will not work, and you must
  15304.                       use the equivalent command supplied with your memory
  15305.                       manager in order to load programs high.
  15306.  
  15307.  
  15308.  
  15309.  
  15310.  
  15311.  
  15312.  
  15313.  
  15314.  
  15315.  
  15316.  
  15317.  
  15318.  
  15319.           ___________________________________________________________________
  15320.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  261
  15321.  
  15322.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LIST
  15323.           ___________________________________________________________________
  15324.  
  15325.  
  15326.           LIST                                                          (New)
  15327.  
  15328.           Purpose:    Display a file, with forward and backward paging and
  15329.                       scrolling.
  15330.  
  15331.           Format:     LIST [/H /S /W] file...
  15332.  
  15333.                       file:  A file or list of files to display.
  15334.  
  15335.                       /H(igh bit off)             /W(rap)
  15336.                       /S(tandard input)
  15337.  
  15338.                       See also: TYPE.
  15339.  
  15340.           Usage:      LIST provides a much faster and more flexible way to
  15341.                       view a file than TYPE, without the overhead of loading
  15342.                       and using a text editor.
  15343.  
  15344.                       LIST is normally used for displaying ASCII text files.
  15345.                       Most other files contain non-alphabetic characters and
  15346.                       may be unreadable.
  15347.  
  15348.                       For example, to display a file called MEMO.DOC:
  15349.  
  15350.                            c:\> list memo.doc
  15351.  
  15352.                       LIST uses the cursor pad to scroll through the file.
  15353.                       The following keys have special meanings:
  15354.  
  15355.                            Home              Display the first page of the
  15356.                                              file.
  15357.                            End               Display the last page of the
  15358.                                              file.
  15359.                            Esc               Exit the current file.
  15360.                            Ctrl-C            Quit LIST.
  15361.                            Up Arrow          Scroll up one line.
  15362.                            Down Arrow        Scroll down one line.
  15363.                            Left Arrow        Scroll left 8 columns.
  15364.                            Right Arrow       Scroll right 8 columns.
  15365.                            Ctrl- Left Arrow  Scroll left 40 columns.
  15366.                            Ctrl-Right Arrow  Scroll right 40 columns.
  15367.                            F1                Call the 4DOS online help
  15368.                            F                 Prompt and search for a string
  15369.                                              (case is ignored).
  15370.                            H                 Toggle the "strip high bit" (/H)
  15371.                                              option.
  15372.                            N                 Find next matching string (case
  15373.                                              is ignored).
  15374.  
  15375.  
  15376.           ___________________________________________________________________
  15377.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  262
  15378.  
  15379.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LIST
  15380.           ___________________________________________________________________
  15381.  
  15382.  
  15383.                            P                 Print the entire file on LPT1.
  15384.                            W                 Toggle the "line wrap" (/W)
  15385.                                              option.
  15386.  
  15387.                       LIST saves the search string used by F and N, so you
  15388.                       can LIST multiple files and search for the same string
  15389.                       simply by pressing N in each file, or repeat your
  15390.                       search the next time you use LIST.
  15391.  
  15392.                   ##  Most of the LIST keystrokes can be reassigned with
  15393.                       4DOS.INI file directives (see pages 133 and 137).
  15394.  
  15395.                   ##  You can set the default colors used by LIST (and
  15396.                       SELECT) using the ListColors directive in 4DOS.INI.  If
  15397.                       ListColors is not used the LIST display will use the
  15398.                       current screen colors.
  15399.  
  15400.           Options:##  /H(igh bit off):  Strip the high bit from each
  15401.                       character before displaying. This is useful when
  15402.                       displaying files created by some word processors that
  15403.                       turn on the high bit for formatting purposes.  If you
  15404.                       are displaying a word processor text file and see
  15405.                       unusual characters mixed in with the text, try this
  15406.                       option.
  15407.  
  15408.                       /S(tandard input):  Read from the standard input rather
  15409.                       than a file.  This allows you to redirect command
  15410.                       output and view it with LIST.  For example, to use LIST
  15411.                       to display the output of DIR:
  15412.  
  15413.                            c:\> dir | list /s
  15414.  
  15415.                       To redefine the DIR command to always display its
  15416.                       output via LIST, use this alias:
  15417.  
  15418.                            c:\> alias dir `*dir %& | list /s`
  15419.  
  15420.                       /W(rap):  Wrap the text at the right margin.  This
  15421.                       option is useful when displaying files that don't have
  15422.                       a carriage return at the end of each line.  The
  15423.                       horizontal scrolling keys are intended for use when the
  15424.                       display is not wrapped.  If you wrap the display with
  15425.                       /W (or with the W key from within LIST), then use the
  15426.                       scrolling keys, the wrapping will change as each line
  15427.                       is scrolled.  This may produce an unusual display,
  15428.                       depending on the structure of the file you are viewing.
  15429.  
  15430.  
  15431.  
  15432.  
  15433.           ___________________________________________________________________
  15434.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  263
  15435.  
  15436.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LOADBTM
  15437.           ___________________________________________________________________
  15438.  
  15439.  
  15440.           LOADBTM                                                       (New)
  15441.  
  15442.           Purpose:    Switch a batch file to or from BTM mode.
  15443.  
  15444.           Format:     LOADBTM [ON | OFF]
  15445.  
  15446.           Usage:      4DOS recognizes two kinds of batch files: .BAT and
  15447.                       .BTM.  Batch files executing in BTM mode run two to
  15448.                       five times faster than in BAT mode.  However, BTM mode
  15449.                       should not be used to load memory-resident programs,
  15450.                       nor should BTM mode be used for self-modifying batch
  15451.                       files.  Batch files automatically start in the mode
  15452.                       indicated by their file extension, .BAT or .BTM.
  15453.  
  15454.                       The LOADBTM command turns BTM mode on and off.  It can
  15455.                       be used to switch modes in either a .BAT or .BTM file.
  15456.                       It can also be used to display the current batch mode
  15457.                       from inside a batch file when it is used with no
  15458.                       argument.
  15459.  
  15460.                       LOADBTM can only be used within a .BAT or .BTM file.
  15461.                       It is most often used to switch a .BAT file into BTM
  15462.                       mode after memory-resident programs are loaded, to
  15463.                       convert a .BAT file to BTM mode without changing its
  15464.                       extension, or to switch a .BTM file into BAT mode in
  15465.                       order to load memory-resident programs.
  15466.  
  15467.                       Using LOADBTM to repeatedly switch modes within a .BAT
  15468.                       or .BTM file is not efficient.  In most cases, the
  15469.                       speed gained by running some parts of the file in BTM
  15470.                       mode will be more than offset by the speed lost through
  15471.                       repeated loading of the file each time BTM mode is
  15472.                       invoked.
  15473.  
  15474.                       The following .BAT file fragment loads some memory
  15475.                       resident programs (TSRs), and then switches to BTM
  15476.                       mode:
  15477.  
  15478.                            rem   Because this file has a .BAT extension,
  15479.                            rem   the initial default state is LOADBTM OFF
  15480.                            rem   Loading TSRs...
  15481.                            ansi.com
  15482.                            mouse.com
  15483.                            rem   Switch to high-speed (BTM) mode now that
  15484.                            rem   TSRs are loaded
  15485.                            loadbtm on
  15486.                            path c:\;c:\util;c:\dos
  15487.                            alias /r c:\aliases
  15488.  
  15489.  
  15490.           ___________________________________________________________________
  15491.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  264
  15492.  
  15493.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LOADBTM
  15494.           ___________________________________________________________________
  15495.  
  15496.  
  15497.  
  15498.                       For more information on .BTM and .BAT files, see page
  15499.                       100.
  15500.  
  15501.  
  15502.  
  15503.  
  15504.  
  15505.  
  15506.  
  15507.  
  15508.  
  15509.  
  15510.  
  15511.  
  15512.  
  15513.  
  15514.  
  15515.  
  15516.  
  15517.  
  15518.  
  15519.  
  15520.  
  15521.  
  15522.  
  15523.  
  15524.  
  15525.  
  15526.  
  15527.  
  15528.  
  15529.  
  15530.  
  15531.  
  15532.  
  15533.  
  15534.  
  15535.  
  15536.  
  15537.  
  15538.  
  15539.  
  15540.  
  15541.  
  15542.  
  15543.  
  15544.  
  15545.  
  15546.  
  15547.           ___________________________________________________________________
  15548.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  265
  15549.  
  15550.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LOG
  15551.           ___________________________________________________________________
  15552.  
  15553.  
  15554.           LOG                                                           (New)
  15555.  
  15556.           Purpose:    Save a log of commands to a disk file.
  15557.  
  15558.           Format:     LOG [/W file] [ON | OFF | text]
  15559.  
  15560.                       file:  The name of the file to hold the log.
  15561.                       text:  An optional message that will be added to the
  15562.                       log.
  15563.  
  15564.                       /W(rite to).
  15565.  
  15566.                       See also: HISTORY.
  15567.  
  15568.           Usage:      LOG keeps a record of all internal and external
  15569.                       commands you use.  Each entry includes the current
  15570.                       system date and time, along with the actual command
  15571.                       after any alias or variable expansion.  You can use the
  15572.                       log file as a record of your daily activities.
  15573.  
  15574.                       By default, LOG writes commands to the file 4DOSLOG in
  15575.                       the root directory of the drive specified in your
  15576.                       COMSPEC environment variable (see page 116).
  15577.  
  15578.                       Entering LOG with no parameters displays the log status
  15579.                       (ON or OFF):
  15580.  
  15581.                            c:\> log
  15582.                            LOG is OFF
  15583.  
  15584.                       To enable or disable logging, add the word "ON" or
  15585.                       "OFF" after the LOG command:
  15586.  
  15587.                            c:\> log on
  15588.  
  15589.                       Entering LOG with text writes a message to the log
  15590.                       file, even if LOG is set OFF.  This allows you to enter
  15591.                       headers in the log file:
  15592.  
  15593.                            c:\> log "Started work on the database system"
  15594.  
  15595.                       The LOG file format looks like this:
  15596.  
  15597.                            [mm-dd-yy  hh:mm:ss]  command
  15598.  
  15599.                       The LOG output can be used as the basis for writing
  15600.                       batch files, but you will probably find HISTORY more
  15601.                       effective for this purpose.
  15602.  
  15603.  
  15604.           ___________________________________________________________________
  15605.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  266
  15606.  
  15607.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LOG
  15608.           ___________________________________________________________________
  15609.  
  15610.  
  15611.  
  15612.           Options:    /W(rite):  This switch specifies a different filename
  15613.                       for the LOG output.  It also automatically performs a
  15614.                       LOG ON command.  For example, to turn logging on and
  15615.                       write the log to C:\LOG\LOGFILE:
  15616.  
  15617.                            c:\> log /w c:\log\logfile
  15618.  
  15619.  
  15620.  
  15621.  
  15622.  
  15623.  
  15624.  
  15625.  
  15626.  
  15627.  
  15628.  
  15629.  
  15630.  
  15631.  
  15632.  
  15633.  
  15634.  
  15635.  
  15636.  
  15637.  
  15638.  
  15639.  
  15640.  
  15641.  
  15642.  
  15643.  
  15644.  
  15645.  
  15646.  
  15647.  
  15648.  
  15649.  
  15650.  
  15651.  
  15652.  
  15653.  
  15654.  
  15655.  
  15656.  
  15657.  
  15658.  
  15659.  
  15660.  
  15661.           ___________________________________________________________________
  15662.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  267
  15663.  
  15664.                            CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MD / MKDIR
  15665.           ___________________________________________________________________
  15666.  
  15667.  
  15668.           MD / MKDIR                                             (Compatible)
  15669.  
  15670.           Purpose:    Create a subdirectory.
  15671.  
  15672.           Format:     MD pathname...
  15673.                            or
  15674.                       MKDIR pathname...
  15675.  
  15676.                       pathname:  The name of one or more directories to
  15677.                       create.
  15678.  
  15679.                       See also: RD.
  15680.  
  15681.           Usage:      MD and MKDIR are synonyms.  You can use either one.
  15682.  
  15683.                       MD creates a subdirectory anywhere in the directory
  15684.                       tree.  To create a subdirectory from the root, start
  15685.                       the pathname with a backslash [\].  For example, this
  15686.                       command creates a subdirectory called MYDIR in the root
  15687.                       directory:
  15688.  
  15689.                            c:\> md \mydir
  15690.  
  15691.                       If no path is given, the new subdirectory is created in
  15692.                       the current directory.  This example creates a
  15693.                       subdirectory called DIRTWO in the current directory:
  15694.  
  15695.                            c:\mydir> md dirtwo
  15696.  
  15697.                       To create a directory from the parent of the current
  15698.                       directory (that is, to create a sibling of the current
  15699.                       directory), start the pathname with two periods and a
  15700.                       backslash [..\].
  15701.  
  15702.                       MD creates one directory at a time.  If you need to
  15703.                       create the directory C:\ONE\TWO\THREE and none of the
  15704.                       named directories exist, you must create each directory
  15705.                       separately.  However, because MD accepts multiple
  15706.                       arguments, you can still create all three directories
  15707.                       in sequence with one command:
  15708.  
  15709.                            c:\> md \one \one\two \one\two\three
  15710.  
  15711.                   ##  DOS will not accept directory names longer than 64
  15712.                       characters.  You must be sure that the complete
  15713.                       directory name from the root to your deepest
  15714.                       subdirectory fits within the 64 character restriction.
  15715.  
  15716.  
  15717.  
  15718.           ___________________________________________________________________
  15719.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  268
  15720.  
  15721.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MEMORY
  15722.           ___________________________________________________________________
  15723.  
  15724.  
  15725.           MEMORY                                                        (New)
  15726.  
  15727.           Purpose:    Display the amount and status of system RAM.
  15728.  
  15729.           Format:     MEMORY
  15730.  
  15731.           Usage:      MEMORY displays information about the RAM in your
  15732.                       system.  It lists the amount of total RAM in your
  15733.                       system and the amount available for applications after
  15734.                       DOS, 4DOS, and memory-resident programs have been
  15735.                       loaded;  the amount of EMS expanded memory, XMS
  15736.                       extended memory, and non-XMS extended memory;  the HMA
  15737.                       status; and the amount of memory 4DOS is using for
  15738.                       environment variable space, alias space, and history
  15739.                       space:
  15740.  
  15741.                            c:\> memory
  15742.                                655,360 bytes total RAM
  15743.                                534,464 bytes free
  15744.  
  15745.                              1,687,552 bytes total EMS memory
  15746.                              1,097,728 bytes free
  15747.  
  15748.                                914,432 bytes total XMS memory (HMA in use)
  15749.  
  15750.                                    512 bytes total environment
  15751.                                    195 bytes free
  15752.  
  15753.                                  1,024 bytes total alias
  15754.                                    452 bytes free
  15755.  
  15756.                                  1,024 bytes total history
  15757.  
  15758.                       You can use the information from the MEMORY display to
  15759.                       fine tune your system, to aid in setting the proper
  15760.                       alias and environment sizes in 4DOS.INI, and to be sure
  15761.                       that you have sufficient memory for your largest
  15762.                       applications.
  15763.  
  15764.                       If you compare the free RAM displayed by MEMORY with
  15765.                       the free RAM displayed by CHKDSK and some memory map
  15766.                       programs, MEMORY will usually show a slightly higher
  15767.                       value.  The difference is the size of the environment
  15768.                       passed to these external programs;  most memory mapping
  15769.                       programs do not count the passed environment as free
  15770.                       space, but MEMORY does.
  15771.  
  15772.  
  15773.  
  15774.  
  15775.           ___________________________________________________________________
  15776.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  269
  15777.  
  15778.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MOVE
  15779.           ___________________________________________________________________
  15780.  
  15781.  
  15782.           MOVE                                                          (New)
  15783.  
  15784.           Purpose:    Move files to a new directory and drive.
  15785.  
  15786.           Format:     MOVE  [/C /D /H /N /P /Q /R /S /U] source...
  15787.                       destination
  15788.  
  15789.                       source:  A file or list of files to move.
  15790.                       destination:  The new location for the files.
  15791.  
  15792.                       /C(hanged)                  /Q(uiet)
  15793.                       /D(irectory)                /R(eplace)
  15794.                       /H(idden and system)        /S(ubdirectory tree)
  15795.                       /N(othing)                  /U(pdate)
  15796.                       /P(rompt)
  15797.  
  15798.                       See also: COPY and RENAME.
  15799.  
  15800.           Usage:      The MOVE command moves one or more files from one
  15801.                       directory to another, whether the directories are on
  15802.                       the same drive or not.  It has the same effect as
  15803.                       copying the files to a new location and then deleting
  15804.                       the originals.  Like COPY and RENAME, MOVE works with
  15805.                       single files, multiple files, and sets of files
  15806.                       specified with an include list.  Like those commands,
  15807.                       MOVE never changes the attributes of the files that it
  15808.                       operates on.
  15809.  
  15810.                       The simplest MOVE command moves a single source file to
  15811.                       a new location and, optionally, gives it a new name.
  15812.                       These two examples both move one file from drive C: to
  15813.                       the root directory on drive A:
  15814.  
  15815.                            c:\> move myfile.dat a:\
  15816.                            c:\> move myfile.dat a:\savefile.dat
  15817.  
  15818.                       In both cases, MYFILE.DAT is removed from drive C:
  15819.                       after it has been copied to drive A:.  If a file called
  15820.                       MYFILE.DAT in the first example, or SAVEFILE.DAT in the
  15821.                       second example, already existed on drive A:, it would
  15822.                       be overwritten.  (This demonstrates the difference
  15823.                       between MOVE and RENAME.  MOVE will move files between
  15824.                       drives and will overwrite the destination file if it
  15825.                       exists; RENAME will not.)
  15826.  
  15827.                       If you MOVE multiple files, the destination must be a
  15828.                       directory name.  MOVE will move each file into the
  15829.                       destination directory with its original name (if the
  15830.  
  15831.  
  15832.           ___________________________________________________________________
  15833.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  270
  15834.  
  15835.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MOVE
  15836.           ___________________________________________________________________
  15837.  
  15838.  
  15839.                       target is not a directory, MOVE will display an error
  15840.                       message and exit):
  15841.  
  15842.                            c:\> move *.wks *.txt c:\finance\myfiles
  15843.  
  15844.                       You cannot move a file to a character device like the
  15845.                       printer, or to itself.
  15846.  
  15847.                   !   Be careful when you use MOVE with the SELECT command.
  15848.                       If you SELECT multiple files and if the target is not a
  15849.                       directory (because of a misspelling, for example) each
  15850.                       file will be moved in turn to the target file,
  15851.                       overwriting the previous file, and then the original
  15852.                       will be erased before the next file is moved.  At the
  15853.                       end of the command, all of the original files will have
  15854.                       been erased and only the last file will exist as the
  15855.                       target file.  You can avoid this problem by using
  15856.                       square brackets with SELECT instead of parentheses (be
  15857.                       sure that you don't allow the command line to get too
  15858.                       long -- watch the character count in the upper left
  15859.                       corner while you're selecting files).  MOVE will then
  15860.                       receive one list of files to move instead of a series
  15861.                       of individual filenames, and it will detect the error
  15862.                       and halt.  You can also add a backslash [\] to the end
  15863.                       of the destination name to ensure that it is the name
  15864.                       of a subdirectory (see below).
  15865.  
  15866.                       When you move files to another directory, if you add a
  15867.                       backslash [\] to the end of the destination name MOVE
  15868.                       will display an error message if the name does not
  15869.                       refer to an existing directory.  You can use this
  15870.                       feature to keep MOVE from treating a mistyped
  15871.                       destination directory name as a file name, and
  15872.                       attempting to move all source files to that name.  The
  15873.                       /D option performs the same function but will also
  15874.                       prompt to see if you want to create the destination
  15875.                       directory if it doesn't exist.  The /S option always
  15876.                       tries to create the destination directory if necessary,
  15877.                       so this feature will not be effective when /S is used.
  15878.  
  15879.                   ##  MOVE first attempts to rename the file(s), which is the
  15880.                       fastest way to move files between subdirectories on the
  15881.                       same drive.  If that fails (the destination is on a
  15882.                       different drive or already exists), MOVE will copy the
  15883.                       file(s) and then delete the originals.
  15884.  
  15885.                   ##  If you are using 4DOS in an OS/2 DOS session, MOVE will
  15886.                       copy OS/2 extended attributes from the source to the
  15887.  
  15888.  
  15889.           ___________________________________________________________________
  15890.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  271
  15891.  
  15892.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MOVE
  15893.           ___________________________________________________________________
  15894.  
  15895.  
  15896.                       destination, provided the the file system on the
  15897.                       destination drive supports them.  You can disable this
  15898.                       feature with the CopyEA = No directive in 4DOS.INI (see
  15899.                       page 138).
  15900.  
  15901.           Options:    /C(hanged files):  Move files only if the destination
  15902.                       file exists and is older than the source (see also /U).
  15903.                       This option is useful for updating the files in one
  15904.                       directory from those in another without moving any
  15905.                       newly created files.
  15906.  
  15907.                       /D(irectory):  Requires that the destination be a
  15908.                       directory.  If the destination does not exist, MOVE
  15909.                       will prompt to see if you want to create it.  If the
  15910.                       destination exists as a file, MOVE will fail with an
  15911.                       "Access denied" error.  Use this option to avoid having
  15912.                       MOVE accidentally interpret your destination name as a
  15913.                       file name when it's really a mistyped directory name.
  15914.  
  15915.                   ##  /H(idden):  Move all files, including hidden and system
  15916.                       files.
  15917.  
  15918.                   ##  /N(othing):  Do everything except actually move the
  15919.                       file(s)   This option is most useful for testing what a
  15920.                       complex MOVE command will do.
  15921.  
  15922.                       /P(rompt):  Ask the user to confirm each move by
  15923.                       pressing Y or N.  An N response will skip that
  15924.                       particular file.
  15925.  
  15926.                       /Q(uiet):  Don't display filenames as they are moved.
  15927.  
  15928.                       /R(eplace):  Prompt for a Y or N response before
  15929.                       overwriting an existing destination file.
  15930.  
  15931.                   ##  /S(ubdirectories):  Move an entire subdirectory tree to
  15932.                       another location.  MOVE will attempt to create the
  15933.                       destination directories if they don't exist, and will
  15934.                       remove empty subdirectories after the move.  When /D is
  15935.                       used with /S, you will be prompted if the first
  15936.                       destination directory does not exist, but
  15937.                       subdirectories below that will be created automatically
  15938.                       by MOVE.  For example, the following alias will "graft"
  15939.                       a directory and all of its subdirectories into a new
  15940.                       place in the directory tree, and -- because /D is used
  15941.                       -- will prompt to see if you want to create the first
  15942.                       destination directory it if it doesn't exist.  The /H
  15943.  
  15944.  
  15945.  
  15946.           ___________________________________________________________________
  15947.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  272
  15948.  
  15949.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MOVE
  15950.           ___________________________________________________________________
  15951.  
  15952.  
  15953.                       in this alias ensures that any hidden files and
  15954.                       subdirectories are also moved:
  15955.  
  15956.                            alias graft `move /s/d/h %1\*.* %2`
  15957.  
  15958.                       /U(pdate):  Move each source file only if it is newer
  15959.                       than a matching destination file or if a matching
  15960.                       destination file does not exist (also see /C).  This
  15961.                       option is useful for moving new files from one
  15962.                       directory to another.
  15963.  
  15964.  
  15965.  
  15966.  
  15967.  
  15968.  
  15969.  
  15970.  
  15971.  
  15972.  
  15973.  
  15974.  
  15975.  
  15976.  
  15977.  
  15978.  
  15979.  
  15980.  
  15981.  
  15982.  
  15983.  
  15984.  
  15985.  
  15986.  
  15987.  
  15988.  
  15989.  
  15990.  
  15991.  
  15992.  
  15993.  
  15994.  
  15995.  
  15996.  
  15997.  
  15998.  
  15999.  
  16000.  
  16001.  
  16002.  
  16003.           ___________________________________________________________________
  16004.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  273
  16005.  
  16006.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PATH
  16007.           ___________________________________________________________________
  16008.  
  16009.  
  16010.           PATH                                                     (Enhanced)
  16011.  
  16012.           Purpose:    Display or alter the list of directories that 4DOS will
  16013.                       search for executable and batch files that are not in
  16014.                       the current directory.
  16015.  
  16016.           Format:     PATH [directory[;directory...]]
  16017.  
  16018.                       directory:  The full name of a directory to include in
  16019.                       the path setting.
  16020.  
  16021.                       See also: SET and ESET.
  16022.  
  16023.           Usage:      When 4DOS is asked to execute an external command (a
  16024.                       .COM, .EXE, .BTM, or .BAT file or executable
  16025.                       extension), it first looks for the file in the current
  16026.                       directory.  If it fails to find an executable file
  16027.                       there, it then searches each of the directories
  16028.                       specified in the path setting, in the order that they
  16029.                       are included.
  16030.  
  16031.                       For example, the following PATH command directs 4DOS to
  16032.                       search subdirectories for an executable file in the
  16033.                       following order: the current directory, the root
  16034.                       directory on C, the DOS subdirectory on C, and the UTIL
  16035.                       subdirectory on C:
  16036.  
  16037.                            c:\> path c:\;c:\dos;c:\util
  16038.  
  16039.                       The list of directories to search can be set or viewed
  16040.                       with the PATH command.  The list is stored as an
  16041.                       environment string, and can also be set or viewed with
  16042.                       the SET command and edited with the ESET command.
  16043.  
  16044.                       Directory names in the path must be separated by
  16045.                       semicolons [;].  4DOS shifts each directory name to
  16046.                       upper case.  This maintains compatibility with programs
  16047.                       which can only recognize upper case directory names in
  16048.                       the path variable.
  16049.  
  16050.                       If you modify your path with the SET or ESET command,
  16051.                       you may include directory names in lower case.  These
  16052.                       may cause trouble with some programs, which assume that
  16053.                       all path entries have been shifted to upper case.
  16054.  
  16055.                       If you enter PATH with no parameters, 4DOS displays the
  16056.                       current search path:
  16057.  
  16058.  
  16059.  
  16060.           ___________________________________________________________________
  16061.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  274
  16062.  
  16063.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PATH
  16064.           ___________________________________________________________________
  16065.  
  16066.  
  16067.  
  16068.                            c:\> path
  16069.                            PATH=C:\;C:\DOS;C:\UTIL
  16070.  
  16071.                       If you enter PATH and a semicolon, 4DOS clears the
  16072.                       search path and will search only the current directory
  16073.                       (this is the default at system startup).
  16074.  
  16075.                       Some applications also use the PATH variable to search
  16076.                       for their data files.
  16077.  
  16078.                   ##  If you include an explicit file extension on the
  16079.                       external command name (for example, WP.EXE), 4DOS will
  16080.                       only look for files with that name and extension in the
  16081.                       current directory and every directory in the path
  16082.                       setting.  It will not look for other executable files
  16083.                       with the same base name.
  16084.  
  16085.                   ##  If you have a directory of a single period [.] in the
  16086.                       path, 4DOS will not search the current directory first,
  16087.                       but will wait and search the current directory when it
  16088.                       reaches the "." in the path.  This allows you to delay
  16089.                       (but not prevent) 4DOS's search of the current
  16090.                       directory for executable files and files with
  16091.                       executable extensions.  In rare cases, this feature may
  16092.                       not be compatible with applications which use the path
  16093.                       to search for their files; if you experience a problem,
  16094.                       you will have to remove the "." as a path entry while
  16095.                       using any such application.
  16096.  
  16097.                   ##  4DOS can create a PATH as long as 250 characters (the
  16098.                       command line is limited to 255 characters, and "PATH "
  16099.                       takes five).  Some applications are written to expect a
  16100.                       PATH no longer than the traditional limit of 123
  16101.                       characters.  If you have extended your path beyond the
  16102.                       traditional limit and experience unusual problems with
  16103.                       application programs, see page 162 for tips on
  16104.                       resolving the difficulty.
  16105.  
  16106.                   ##  If you specify an invalid directory in the path, 4DOS
  16107.                       will skip that directory and continue searching with
  16108.                       the next directory in the path.
  16109.  
  16110.  
  16111.  
  16112.  
  16113.  
  16114.  
  16115.  
  16116.  
  16117.           ___________________________________________________________________
  16118.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  275
  16119.  
  16120.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PAUSE
  16121.           ___________________________________________________________________
  16122.  
  16123.  
  16124.           PAUSE                                                    (Enhanced)
  16125.  
  16126.           Purpose:    Suspend batch file or alias execution.
  16127.  
  16128.           Format:     PAUSE [text]
  16129.  
  16130.                       text:  The message to be displayed as a user prompt.
  16131.  
  16132.           Usage:      A PAUSE command will suspend execution of a batch file
  16133.                       or alias, giving you the opportunity to change disks,
  16134.                       turn on the printer, etc.
  16135.  
  16136.                       PAUSE waits for any key to be pressed and then
  16137.                       continues execution.  You can specify the text that
  16138.                       PAUSE displays while it waits for a keystroke, or let
  16139.                       4DOS use the default message:
  16140.  
  16141.                            Press any key when ready...
  16142.  
  16143.                       For example, the following batch file fragment prompts
  16144.                       the user before erasing files (the PAUSE command should
  16145.                       be entered on one line):
  16146.  
  16147.                            pause Press Ctrl-C to abort, any other key to
  16148.                              erase all .LST files
  16149.                            erase *.lst
  16150.  
  16151.                       If you press Ctrl-C or Ctrl-BREAK while PAUSE is
  16152.                       waiting for a key, execution of an alias will be
  16153.                       terminated, and execution of a batch file will be
  16154.                       suspended while you are asked whether you want to
  16155.                       cancel the batch job.
  16156.  
  16157.  
  16158.  
  16159.  
  16160.  
  16161.  
  16162.  
  16163.  
  16164.  
  16165.  
  16166.  
  16167.  
  16168.  
  16169.  
  16170.  
  16171.  
  16172.  
  16173.  
  16174.           ___________________________________________________________________
  16175.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  276
  16176.  
  16177.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  POPD
  16178.           ___________________________________________________________________
  16179.  
  16180.  
  16181.           POPD                                                          (New)
  16182.  
  16183.           Purpose:    Return to the disk drive and directory at the top of
  16184.                       the directory stack
  16185.  
  16186.           Format:     POPD [*]
  16187.  
  16188.                       See also: DIRS and PUSHD.
  16189.  
  16190.           Usage:      Each time you use the PUSHD command, 4DOS saves the
  16191.                       current disk drive and directory on its internal
  16192.                       directory stack.  POPD restores the last drive and
  16193.                       directory that was saved with PUSHD and removes that
  16194.                       entry from the stack.  You can use these commands
  16195.                       together to change directories, perform some work, and
  16196.                       return to the starting drive and directory.
  16197.  
  16198.                       This example saves and changes the current disk drive
  16199.                       and directory with PUSHD, and then restores it.  The
  16200.                       command line prompt is set to show the current
  16201.                       directory:
  16202.  
  16203.                            c:\> pushd d:\database\test
  16204.                            d:\database\test> pushd c:\wordp\memos
  16205.                            c:\wordp\memos> pushd a:\123
  16206.                            a:\123> popd
  16207.                            c:\wordp\memos> popd
  16208.                            d:\database\test> popd
  16209.                            c:\>
  16210.  
  16211.                       You can use the DIRS command to see the complete list
  16212.                       of saved drives and directories (the directory stack).
  16213.  
  16214.                       The POPD command followed by an asterisk [*] clears the
  16215.                       directory stack without changing the current drive and
  16216.                       directory.
  16217.  
  16218.                   ##  If the directory on the top of the stack is not on the
  16219.                       current drive, POPD will switch to the drive and
  16220.                       directory on the top of the stack without changing the
  16221.                       default directory on the current drive.
  16222.  
  16223.  
  16224.  
  16225.  
  16226.  
  16227.  
  16228.  
  16229.  
  16230.  
  16231.           ___________________________________________________________________
  16232.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  277
  16233.  
  16234.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PROMPT
  16235.           ___________________________________________________________________
  16236.  
  16237.  
  16238.           PROMPT                                                        (New)
  16239.  
  16240.           Purpose:    Change the 4DOS command line prompt.
  16241.  
  16242.           Format:     PROMPT [text]
  16243.  
  16244.                       text:  Text to be used as the 4DOS command line prompt.
  16245.  
  16246.           Usage:      You can change and customize the command line prompt at
  16247.                       any time.  The prompt can include normal text and
  16248.                       system information such as the current drive and
  16249.                       directory, the time and date, and the amount of memory
  16250.                       available.  You can create an informal "Hello, Bob!"
  16251.                       prompt or an official-looking prompt full of impressive
  16252.                       information.
  16253.  
  16254.                       The PROMPT command sets the command line prompt.  The
  16255.                       special characters that can be included in a PROMPT
  16256.                       command are listed below.  For example, to set the
  16257.                       prompt to the current date and time, with a ">" at the
  16258.                       end:
  16259.  
  16260.                            c:\> prompt $d $t $g
  16261.                            Mon  Dec 2, 1991 10:29:19 >
  16262.  
  16263.                       To set the prompt to the current date and time,
  16264.                       followed by the current drive and directory in upper
  16265.                       case on the next line, with a ">" at the end:
  16266.  
  16267.                            c:\> prompt $d $t$_$P$g
  16268.                            Mon  Dec 2, 1991 10:29:19
  16269.                            C:\>
  16270.  
  16271.                       You can include the PROMPT command in your AUTOEXEC.BAT
  16272.                       file to set the prompt whenever your system is
  16273.                       rebooted.
  16274.  
  16275.                       The default prompt is $n$g (drive name plus ">")  on
  16276.                       drives A and B, and $p$g (current drive and directory
  16277.                       plus ">") on all other drives .
  16278.  
  16279.                       If you enter PROMPT with no arguments, 4DOS resets the
  16280.                       prompt to the default.  The PROMPT command sets the
  16281.                       environment variable PROMPT, so to view the current
  16282.                       prompt setting use the command:
  16283.  
  16284.                            c:\> set prompt
  16285.  
  16286.  
  16287.  
  16288.           ___________________________________________________________________
  16289.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  278
  16290.  
  16291.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PROMPT
  16292.           ___________________________________________________________________
  16293.  
  16294.  
  16295.  
  16296.                       If the prompt is not set at all 4DOS will not use the
  16297.                       PROMPT environment variable, in which case the SET
  16298.                       command above will give a "Not in environment" error.
  16299.  
  16300.                   ##  Along with literal text, special characters, and ANSI
  16301.                       sequences, you can include the text of any environment
  16302.                       variable, 4DOS internal variable, or variable function
  16303.                       (see pages 81 and 86) in a prompt.  For example, if you
  16304.                       want to include the amount of free base memory in the
  16305.                       command prompt, plus the current drive and directory,
  16306.                       you could use this command:
  16307.  
  16308.                            c:\> prompt (%%@dosmem[K]K) $p$g
  16309.                            (601K) c:\data>
  16310.  
  16311.                       Notice that the @DOSMEM function is shown with two
  16312.                       leading percent signs [%].  If you used only one
  16313.                       percent sign, the @DOSMEM function would be expanded
  16314.                       once when the PROMPT command was executed, instead of
  16315.                       every time 4DOS displayed the prompt.  The result would
  16316.                       be that the amount of memory would never change from
  16317.                       the value it had when you entered the PROMPT command.
  16318.                       You could also use back quotes to delay expanding the
  16319.                       variable function until the prompt is displayed:
  16320.  
  16321.                            c:\> prompt `(%@dosmem[K]K) $p$g`
  16322.  
  16323.                   ##  If you have an ANSI-compatible driver installed, you
  16324.                       can include ANSI escape sequences in the PROMPT text.
  16325.                       This example uses ANSI sequences to set a prompt that
  16326.                       displays the shell level, date, time and path in color
  16327.                       on the top line of the screen (enter the command as one
  16328.                       line):
  16329.  
  16330.                            c:\> prompt $e[s$e[1;1f$e[41;1;37m$e[K[$z] $d
  16331.                                 Time: $t$h$h$h  Path: $p$e[u$e[0;32m$n$g
  16332.  
  16333.                   ##  Traditionally, it was possible to use the PROMPT
  16334.                       command in a batch file to transmit ANSI.SYS control
  16335.                       sequences to the screen (for example, to redefine
  16336.                       function keys).  This technique will not work with
  16337.                       4DOS, which doesn't display a prompt within batch
  16338.                       files; hence the characters in the PROMPT string are
  16339.                       never sent to ANSI.SYS.  To send ANSI sequences in
  16340.                       4DOS, use the ECHO command, substituting a Ctrl-X
  16341.                       followed by an e for $e in the PROMPT string.
  16342.  
  16343.  
  16344.  
  16345.           ___________________________________________________________________
  16346.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  279
  16347.  
  16348.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PROMPT
  16349.           ___________________________________________________________________
  16350.  
  16351.  
  16352.  
  16353.                   ##  You may find it helpful to define a different prompt in
  16354.                       secondary shells, by using $z to display the shell
  16355.                       level, or by placing a PROMPT command in your 4START
  16356.                       file and using IF or IFF statements to set the
  16357.                       appropriate prompt for different shells.
  16358.  
  16359.                       Prompt Characters:
  16360.  
  16361.                       The prompt text can contain special commands in the
  16362.                       form $?, where ? is one of the characters listed below.
  16363.  
  16364.                            b    The vertical bar character [|]
  16365.                            c    The open parenthesis [(]
  16366.                            D    Current date, in the format:  Tue  Jan 1,
  16367.                                    1991
  16368.                            d    Current date, in the format:  Tue  1-01-91
  16369.                            e    The ASCII ESC character (decimal 27)
  16370.                            f    The close parenthesis [)]
  16371.                            g    The > character
  16372.                            h    BACKSPACE over the previous character
  16373.                            l    The < character
  16374.                            n    Current disk letter
  16375.                            P    Current disk and directory (upper case)
  16376.                            p    Current disk and directory (lower case)
  16377.                            q    The = character
  16378.                            r    The numeric exit code of the last external
  16379.                                    command
  16380.                            s    The space character
  16381.                            t    Current time, in the format hh:mm:ss
  16382.                            v    DOS version number, in the format 3.10
  16383.                            Xd:  Current directory on drive d:, in upper case
  16384.                            xd:  Current directory on drive d:, in lower case
  16385.                            z    Current 4DOS shell nesting level; the
  16386.                                    primary command processor is shell 0.
  16387.                            $    The $ character
  16388.                            _    CR/LF (go to beginning of a new line)
  16389.  
  16390.                   ##  The format for the date ($d) depends on the country
  16391.                       code defined in the CONFIG.SYS file or by the CHCP
  16392.                       command.  The default format is U.S. (mm-dd-yy).  The
  16393.                       European format is dd-mm-yy; the Japanese is yy-mm-dd.
  16394.                       The separator used for the time ($t) will also be
  16395.                       changed based on the country definition.
  16396.  
  16397.  
  16398.  
  16399.  
  16400.  
  16401.  
  16402.           ___________________________________________________________________
  16403.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  280
  16404.  
  16405.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PUSHD
  16406.           ___________________________________________________________________
  16407.  
  16408.  
  16409.           PUSHD                                                         (New)
  16410.  
  16411.           Purpose:    Save the current disk drive and directory, optionally
  16412.                       moving to a new drive and directory.
  16413.  
  16414.           Format:     PUSHD [pathname]
  16415.  
  16416.                       pathname:  The name of the new default drive and
  16417.                       directory.
  16418.  
  16419.                       See also: DIRS, POPD and CDPATH on page 117.
  16420.  
  16421.           Usage:      PUSHD saves the current drive and directory on a "last
  16422.                       in, first out" directory stack.  The POPD command
  16423.                       returns to the last drive and directory that was saved
  16424.                       by PUSHD.  You can use these commands together to
  16425.                       change directories, perform some work, and return to
  16426.                       the starting drive and directory.
  16427.  
  16428.                       The DIRS command displays the contents of the directory
  16429.                       stack.
  16430.  
  16431.                       To save the current drive and directory, without
  16432.                       changing directories:
  16433.  
  16434.                            c:\> pushd
  16435.                            c:\>
  16436.  
  16437.                       If a pathname is specified as part of the PUSHD
  16438.                       command, the current drive and directory are saved and
  16439.                       the specified pathname becomes the new current drive
  16440.                       and directory.  If the pathname includes a drive
  16441.                       letter, PUSHD changes to the specified directory on the
  16442.                       new drive without changing the default current
  16443.                       directory on the original drive.
  16444.  
  16445.                       This example saves the current directory and changes to
  16446.                       C:\WORDP\MEMOS, then returns to the original directory
  16447.                       with POPD:
  16448.  
  16449.                            c:\> pushd \wordp\memos
  16450.                            c:\wordp\memos> popd
  16451.                            c:\>
  16452.  
  16453.                   ##  The directory stack can hold up to 255 characters or
  16454.                       about 10 to 20 entries depending on the length of the
  16455.                       directory names.  If you exceed the directory stack
  16456.  
  16457.  
  16458.  
  16459.           ___________________________________________________________________
  16460.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  281
  16461.  
  16462.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PUSHD
  16463.           ___________________________________________________________________
  16464.  
  16465.  
  16466.                       size, the oldest directory is removed before adding the
  16467.                       current directory.
  16468.  
  16469.                   ##  If PUSHD can't change to the specified directory, it
  16470.                       will look for the CDPATH environment variable.  PUSHD
  16471.                       will append the specified directory name to each
  16472.                       directory in CDPATH and attempt to change to that drive
  16473.                       and directory, until the first match or the end of the
  16474.                       CDPATH argument.  This allows you to use CDPATH as a
  16475.                       quick way to find commonly used subdirectories which
  16476.                       have unique names.  For example, if you are currently
  16477.                       in the directory C:\WP\LETTERS\JANUARY and you'd like
  16478.                       to change to D:\SOFTWARE\UTIL, you could enter the
  16479.                       command:
  16480.  
  16481.                            c:\wp\letters\january> pushd d:\software\util
  16482.  
  16483.                       However if the D:\SOFTWARE directory is listed in your
  16484.                       CDPATH variable, and is the first directory in the list
  16485.                       with a UTIL subdirectory, you can simply enter the
  16486.                       command:
  16487.  
  16488.                            c:\wp\letters\january> pushd util
  16489.  
  16490.                       and 4DOS will change to D:\SOFTWARE\UTIL.
  16491.  
  16492.  
  16493.  
  16494.  
  16495.  
  16496.  
  16497.  
  16498.  
  16499.  
  16500.  
  16501.  
  16502.  
  16503.  
  16504.  
  16505.  
  16506.  
  16507.  
  16508.  
  16509.  
  16510.  
  16511.  
  16512.  
  16513.  
  16514.  
  16515.  
  16516.           ___________________________________________________________________
  16517.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  282
  16518.  
  16519.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  QUIT
  16520.           ___________________________________________________________________
  16521.  
  16522.  
  16523.           QUIT                                                          (New)
  16524.  
  16525.           Purpose:    Terminate the current batch file.
  16526.  
  16527.           Format:     QUIT [value]
  16528.  
  16529.                       value:  The exit code from 0 to 255 to return to 4DOS
  16530.                       or to the previous batch file.
  16531.  
  16532.                       See also: CANCEL.
  16533.  
  16534.           Usage:      QUIT provides a simple way to exit a batch file before
  16535.                       reaching the end of the file.  If you QUIT a batch file
  16536.                       called from another batch file, you will be returned to
  16537.                       the previous file at the line following the original
  16538.                       call.
  16539.  
  16540.                       This example batch file fragment checks to see if the
  16541.                       user entered "quit" and exits if true.
  16542.  
  16543.                            input  Enter your choice :  %%option
  16544.                            if  "%option" == "quit"  quit
  16545.  
  16546.                       To end all batch file processing, use the CANCEL
  16547.                       command.
  16548.  
  16549.                   ##  If you specify a value, QUIT will set the ERRORLEVEL or
  16550.                       exit code (see the IF command, and the %? variable on
  16551.                       page 82) to that value.
  16552.  
  16553.                   ##  You can also use QUIT in an alias.  If you QUIT an
  16554.                       alias while inside a batch file, QUIT will end both the
  16555.                       alias and the batch file and return you to the 4DOS
  16556.                       command prompt or to the calling batch file.
  16557.  
  16558.  
  16559.  
  16560.  
  16561.  
  16562.  
  16563.  
  16564.  
  16565.  
  16566.  
  16567.  
  16568.  
  16569.  
  16570.  
  16571.  
  16572.  
  16573.           ___________________________________________________________________
  16574.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  283
  16575.  
  16576.                            CHAPTER 8 / COMMAND REFERENCE GUIDE  /  RD / RMDIR
  16577.           ___________________________________________________________________
  16578.  
  16579.  
  16580.           RD / RMDIR                                               (Enhanced)
  16581.  
  16582.           Purpose:    Remove one or more subdirectories.
  16583.  
  16584.           Format:     RD pathname...
  16585.                            or
  16586.                       RMDIR pathname...
  16587.  
  16588.                       pathname:  The name of a subdirectory to remove.
  16589.  
  16590.                       See also: MD.
  16591.  
  16592.           Usage:      RD and RMDIR are synonyms.  You can use either one.
  16593.  
  16594.                       RD removes directories from the directory tree.  For
  16595.                       example, to remove the subdirectory MEMOS from the
  16596.                       subdirectory WP, you can use this command:
  16597.  
  16598.                            c:\> rd \wp\memos
  16599.  
  16600.                       Before using RD, you must delete all files and
  16601.                       subdirectories (and their files) in the pathname you
  16602.                       want to remove.  Remember to remove hidden and read-
  16603.                       only files as well as normal files.
  16604.  
  16605.                   ##  To use a single command to remove entire subdirectory
  16606.                       trees including all files, see the /S and /X options of
  16607.                       the DEL command.
  16608.  
  16609.                   ##  You cannot remove the root directory, the current
  16610.                       directory (.), or any directory above the current
  16611.                       directory in the directory tree.
  16612.  
  16613.                   ##  You can use wildcards in the pathname.
  16614.  
  16615.  
  16616.  
  16617.  
  16618.  
  16619.  
  16620.  
  16621.  
  16622.  
  16623.  
  16624.  
  16625.  
  16626.  
  16627.  
  16628.  
  16629.  
  16630.           ___________________________________________________________________
  16631.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  284
  16632.  
  16633.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  REBOOT
  16634.           ___________________________________________________________________
  16635.  
  16636.  
  16637.           REBOOT                                                        (New)
  16638.  
  16639.           Purpose:    Do a warm or cold system reboot.
  16640.  
  16641.           Format:     REBOOT [/C /V]
  16642.  
  16643.                       /C(old reboot)              /V(erify)
  16644.  
  16645.           ## Usage:   REBOOT will completely restart your computer.  It is
  16646.                       comparable to pressing Ctrl-Alt-Delete (a warm reboot)
  16647.                       or to turning the power off and back on or pressing the
  16648.                       reset button (a cold reboot).  A reboot is necessary to
  16649.                       activate any changes to your CONFIG.SYS file, and may
  16650.                       also be used if you wish to restart the system with an
  16651.                       altered 4START or AUTOEXEC.BAT file.
  16652.  
  16653.                       The following example prompts you to verify the reboot,
  16654.                       then does a cold boot:
  16655.  
  16656.                            c:\> reboot /c/v
  16657.  
  16658.                       REBOOT defaults to performing a warm boot, with no
  16659.                       prompting.
  16660.  
  16661.                       REBOOT flushes the disk buffers, resets the drives, and
  16662.                       waits one second before rebooting, to allow disk
  16663.                       caching programs to finish writing any cached data .
  16664.  
  16665.                   !   Some system BIOSes, memory managers, multitaskers, or
  16666.                       memory-resident programs (TSRs) may intercept attempts
  16667.                       to reboot your system, and defeat them entirely,
  16668.                       convert a cold boot request to a warm boot or vice
  16669.                       versa, or in very rare cases, hang the system --
  16670.                       requiring a reboot!  As a result you may need to
  16671.                       experiment with which reboot options work best for your
  16672.                       system hardware and software configuration, and under
  16673.                       rare circumstances REBOOT may not be useable on your
  16674.                       system.
  16675.  
  16676.           Options:    /C(old):  Do a "cold" reboot.  This is similar to
  16677.                       turning the power off and back on, and may be necessary
  16678.                       to properly initialize the system.  REBOOT /C may not
  16679.                       physically reset all hardware devices as thoroughly as
  16680.                       actually turning off the power; its effect depends on
  16681.                       the internal design of each hardware device and on your
  16682.                       system configuration.
  16683.  
  16684.  
  16685.  
  16686.  
  16687.           ___________________________________________________________________
  16688.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  285
  16689.  
  16690.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  REBOOT
  16691.           ___________________________________________________________________
  16692.  
  16693.  
  16694.  
  16695.                       /V(erify):  Prompt for confirmation (Y or N) before
  16696.                       rebooting.
  16697.  
  16698.  
  16699.  
  16700.  
  16701.  
  16702.  
  16703.  
  16704.  
  16705.  
  16706.  
  16707.  
  16708.  
  16709.  
  16710.  
  16711.  
  16712.  
  16713.  
  16714.  
  16715.  
  16716.  
  16717.  
  16718.  
  16719.  
  16720.  
  16721.  
  16722.  
  16723.  
  16724.  
  16725.  
  16726.  
  16727.  
  16728.  
  16729.  
  16730.  
  16731.  
  16732.  
  16733.  
  16734.  
  16735.  
  16736.  
  16737.  
  16738.  
  16739.  
  16740.  
  16741.  
  16742.  
  16743.  
  16744.           ___________________________________________________________________
  16745.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  286
  16746.  
  16747.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  REM
  16748.           ___________________________________________________________________
  16749.  
  16750.  
  16751.           REM                                                    (Compatible)
  16752.  
  16753.           Purpose:    Put a comment in a batch file.
  16754.  
  16755.           Format:     REM [comment]
  16756.  
  16757.                       comment:  The text to include in the batch file.
  16758.  
  16759.           Usage:      The REM command lets you place a remark or comment in a
  16760.                       batch file.  Batch file comments are useful for
  16761.                       documenting the purpose of a batch file and the
  16762.                       procedures you have used.  For example
  16763.  
  16764.                            rem This batch file provides a
  16765.                            rem menu-based system for accessing
  16766.                            rem word processing utilities.
  16767.                            rem
  16768.                            rem Clear the screen and get selection
  16769.                            cls
  16770.  
  16771.                       REM must be followed by a space or tab character and
  16772.                       then your comment.  Comments can be up to 255
  16773.                       characters long.  4DOS will ignore everything on the
  16774.                       line after the REM command (including quote characters,
  16775.                       redirection symbols, and other commands).
  16776.  
  16777.                       If ECHO is ON, 4DOS will display the comment.
  16778.                       Otherwise, 4DOS will ignore it.
  16779.  
  16780.                       If ECHO is ON and you don't want to display the line,
  16781.                       preface the REM command with the @ character.
  16782.  
  16783.  
  16784.  
  16785.  
  16786.  
  16787.  
  16788.  
  16789.  
  16790.  
  16791.  
  16792.  
  16793.  
  16794.  
  16795.  
  16796.  
  16797.  
  16798.  
  16799.  
  16800.  
  16801.           ___________________________________________________________________
  16802.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  287
  16803.  
  16804.                          CHAPTER 8 / COMMAND REFERENCE GUIDE  /  REN / RENAME
  16805.           ___________________________________________________________________
  16806.  
  16807.  
  16808.           REN / RENAME                                             (Enhanced)
  16809.  
  16810.           Purpose:    Rename files or subdirectories.
  16811.  
  16812.           Format:     REN [/N /P /Q /S] old_name... new_name
  16813.                            or
  16814.                       RENAME [/N /P /Q /S] old_name... new_name
  16815.  
  16816.                       old_name:  Original name of the file(s) or
  16817.                       subdirectory.
  16818.                       new_name:  New name to use or new path on the same
  16819.                       drive.
  16820.  
  16821.                       /N(othing)                  /Q(uiet)
  16822.                       /P(rompt)                   /S(ubdirectory)
  16823.  
  16824.                       See Also: COPY and MOVE.
  16825.  
  16826.           Usage:      REN and RENAME are synonyms.  You may use either one.
  16827.  
  16828.                       REN lets you change the name of a file or a
  16829.                       subdirectory.  You can also use REN to move one or more
  16830.                       files to a new subdirectory on the same drive.  (If you
  16831.                       want to move files to a different drive, use MOVE.)
  16832.  
  16833.                       In its simplest form, you simply give REN the old_name
  16834.                       of an existing file or subdirectory and then a
  16835.                       new_name.  The new_name must not already exist -- you
  16836.                       can't give two files the same name (unless they are in
  16837.                       different directories).  The first example renames the
  16838.                       file MEMO.TXT to OFFICE.TXT.  The second example
  16839.                       changes the name of the \WORDPROC directory to \WP:
  16840.  
  16841.                            c:\> rename memo.txt office.txt
  16842.                            c:\> rename \wordproc \wp
  16843.  
  16844.                       You can also use REN to rename a group of files that
  16845.                       you specify with wildcards, as multiple files, or in an
  16846.                       include list.  When you do, the new_name must use one
  16847.                       or more wildcards to show what part of each filename to
  16848.                       change.  Both of the next two examples change the
  16849.                       extensions of multiple files to .SAV:
  16850.  
  16851.                            c:\> ren config.sys autoexec.bat 4start.btm *.sav
  16852.                            c:\> ren *.txt *.sav
  16853.  
  16854.                       REN can move one or more files to a different
  16855.                       subdirectory on the same drive.  When it is used for
  16856.  
  16857.  
  16858.           ___________________________________________________________________
  16859.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  288
  16860.  
  16861.                          CHAPTER 8 / COMMAND REFERENCE GUIDE  /  REN / RENAME
  16862.           ___________________________________________________________________
  16863.  
  16864.  
  16865.                       this purpose, REN requires one or more filenames for
  16866.                       the old_name and a directory name for the new_name:
  16867.  
  16868.                            c:\> ren memo.txt c:\wp\memos\
  16869.                            c:\> ren oct.dat nov.dat c:\data\save\
  16870.  
  16871.                       The final backslash in the last two examples is
  16872.                       optional.  If you use it, you force REN to recognize
  16873.                       the last argument as the name of a directory, not a
  16874.                       file.  If you accidentally mistype the directory name,
  16875.                       REN will report an error instead of renaming your files
  16876.                       in a way that you didn't intend.
  16877.  
  16878.                       Finally, REN can move files to a new directory and
  16879.                       change their name at the same time if you specify both
  16880.                       a path and file name for new_name.  In this example,
  16881.                       the files are renamed with an extension of .SAV as they
  16882.                       are moved to a new directory:
  16883.  
  16884.                            c:\> ren *.dat c:\data\save\*.sav
  16885.  
  16886.                       When new_name refers to a file or files (rather than a
  16887.                       directory), the file(s) must not already exist.  Also,
  16888.                       you cannot rename a subdirectory to a new location on
  16889.                       the directory tree.
  16890.  
  16891.                   ##  REN does not change a file's attributes.  The new_name
  16892.                       file(s) will have the same attributes as old_name.
  16893.  
  16894.           Options:    /N(othing):  Do everything except actually rename the
  16895.                       file(s).  This option is useful for testing what a REN
  16896.                       command will actually do.
  16897.  
  16898.                       /P(rompt):  Ask the user to confirm each move by
  16899.                       pressing Y or N.  An N response will skip that
  16900.                       particular file.
  16901.  
  16902.                       /Q(uiet):  Don't display filenames as they are renamed.
  16903.                       This option is most often used in batch files.
  16904.  
  16905.                       /S(ubdirectory):  Normally, you can rename a
  16906.                       subdirectory only if you do not use any wildcards in
  16907.                       the old_name.  This prevents subdirectories from being
  16908.                       renamed inadvertently when a group of files is being
  16909.                       renamed with wildcards.  /S will let you rename a
  16910.                       subdirectory even when you use wildcards.
  16911.  
  16912.  
  16913.  
  16914.  
  16915.           ___________________________________________________________________
  16916.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  289
  16917.  
  16918.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  RETURN
  16919.           ___________________________________________________________________
  16920.  
  16921.  
  16922.           RETURN                                                        (New)
  16923.  
  16924.           Purpose:    Return from a GOSUB (subroutine) in a batch file.
  16925.  
  16926.           Format:     RETURN
  16927.  
  16928.                       See also: GOSUB.
  16929.  
  16930.           ## Usage:   4DOS allows subroutines in batch files.  A subroutine
  16931.                       begins with a label (a colon followed by a word) and
  16932.                       ends with a RETURN command.  The subroutine is invoked
  16933.                       with a GOSUB command from another part of the batch
  16934.                       file.  The RETURN command ends a subroutine; execution
  16935.                       of the batch file will continue on the line following
  16936.                       the original GOSUB.
  16937.  
  16938.                       The following batch file fragment calls a subroutine
  16939.                       which displays the current directory:
  16940.  
  16941.                            echo Calling a subroutine
  16942.                            gosub subr1
  16943.                            echo Returned from the subroutine
  16944.                            quit
  16945.  
  16946.                            :subr1
  16947.                            dir /a/w
  16948.                            return
  16949.  
  16950.  
  16951.  
  16952.  
  16953.  
  16954.  
  16955.  
  16956.  
  16957.  
  16958.  
  16959.  
  16960.  
  16961.  
  16962.  
  16963.  
  16964.  
  16965.  
  16966.  
  16967.  
  16968.  
  16969.  
  16970.  
  16971.  
  16972.           ___________________________________________________________________
  16973.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  290
  16974.  
  16975.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SCREEN
  16976.           ___________________________________________________________________
  16977.  
  16978.  
  16979.           SCREEN                                                        (New)
  16980.  
  16981.           Purpose:    Position the cursor on the screen and optionally
  16982.                       display a message.
  16983.  
  16984.           Format:     SCREEN row column [message]
  16985.  
  16986.                       row:  The new row location for the cursor.
  16987.                       column:  The new column location for the cursor.
  16988.                       message:  Optional text to display at the new cursor
  16989.                       location.
  16990.  
  16991.                       See also: ECHO, SCRPUT, TEXT, and VSCRPUT.
  16992.  
  16993.           Usage:      SCREEN allows you to create attractive screen displays
  16994.                       in batch files.  You use it to specify where a message
  16995.                       will appear on the screen.  You can use SCREEN to
  16996.                       create menu displays, logos, etc.  The following batch
  16997.                       file fragment displays a menu:
  16998.  
  16999.                            @echo off ^ cls
  17000.                            screen 3 10  Select a number from 1 to 4:
  17001.                            screen 6 20  1 - Word Processing
  17002.                            screen 7 20  2 - Spreadsheet
  17003.                            screen 8 20  3 - Telecommunications
  17004.                            screen 9 20  4 - Quit
  17005.  
  17006.                       SCREEN does not change the screen colors.  If you have
  17007.                       ANSI.SYS installed and have set colors with CLS or
  17008.                       COLOR, those colors will be used for the display.  To
  17009.                       display text in specific colors, use SCRPUT or VSCRPUT.
  17010.  
  17011.                       The row and column values are zero-based, so on a
  17012.                       standard 25 line by 80 column display, valid rows are 0
  17013.                       - 24 and valid columns are 0 - 79.
  17014.  
  17015.                       SCREEN checks for a valid row and column, and displays
  17016.                       a "Usage" error message if either value is out of
  17017.                       range.
  17018.  
  17019.  
  17020.  
  17021.  
  17022.  
  17023.  
  17024.  
  17025.  
  17026.  
  17027.  
  17028.  
  17029.           ___________________________________________________________________
  17030.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  291
  17031.  
  17032.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SCRPUT
  17033.           ___________________________________________________________________
  17034.  
  17035.  
  17036.           SCRPUT                                                        (New)
  17037.  
  17038.           Purpose:    Position the cursor on the screen and display a message
  17039.                       in color.
  17040.  
  17041.           Format:     SCRPUT row col [BRIght] [BLInk] fg ON bg text
  17042.  
  17043.                       row:  Starting row
  17044.                       col:  Starting column
  17045.                       fg:  Foreground character color
  17046.                       bg:  Background character color
  17047.                       text:  The text to display
  17048.  
  17049.                       The available colors are:
  17050.  
  17051.                         Black         Blue          Green         Red
  17052.                         Magenta       Cyan          Yellow        White
  17053.  
  17054.                       See also: CLS, ECHO, SCREEN, TEXT, and VSCRPUT.
  17055.  
  17056.           Usage:      SCRPUT allows you to create attractive screen displays
  17057.                       in batch files.  You use it to specify where a message
  17058.                       will appear on the screen and what colors will be used
  17059.                       to display the message text.  You can use SCRPUT to
  17060.                       create menu displays, logos, etc.
  17061.  
  17062.                       SCRPUT works like SCREEN, but allows you to specify the
  17063.                       display colors.  It writes directly to the screen and
  17064.                       does not require an ANSI driver.
  17065.  
  17066.                       Only the first three characters of the color name and
  17067.                       the attributes BRIGHT and BLINK are required.  The row
  17068.                       and column are zero-based, so on a standard 25 line by
  17069.                       80 column display, valid rows are 0 - 24 and valid
  17070.                       columns are 0 - 79.
  17071.  
  17072.                       The following batch file fragment displays a menu in
  17073.                       color (each  SCRPUT command should be entered on one
  17074.                       line):
  17075.  
  17076.                            @echo off ^ cls white on blue
  17077.                            scrput 3 10 bri whi on blue Select a number from
  17078.                              1 to 4:
  17079.                            scrput 6 20 bri red on blue 1 - Word Processing
  17080.                            scrput 7 20 bri yel on blue 2 - Spreadsheet
  17081.                            scrput 8 20 bri gre on blue 3 -
  17082.                            Telecommunications
  17083.                            scrput 9 20 bri mag on blue 4 - Quit
  17084.  
  17085.  
  17086.           ___________________________________________________________________
  17087.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  292
  17088.  
  17089.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SELECT
  17090.           ___________________________________________________________________
  17091.  
  17092.  
  17093.           SELECT                                                        (New)
  17094.  
  17095.           Purpose:    Interactively select files for a command.
  17096.  
  17097.           Format:     SELECT [/A[[:][-][rhsda]] /C /D /O[:][-]adeginrsu]
  17098.                            [command] ... (files...)...
  17099.  
  17100.                       command:  The command to execute with the selected
  17101.                       files.
  17102.                       files:  The files from which to select.  File names may
  17103.                       be enclosed in either parentheses or square brackets.
  17104.                       The difference is explained below.
  17105.  
  17106.                       /A(ttribute select)         /D(isable colorization)
  17107.                       /C(ase -- use upper case)   /O(rder)
  17108.  
  17109.           Usage:      SELECT allows you to select files for internal and
  17110.                       external commands by using a full-screen "point and
  17111.                       shoot" display.  You can have SELECT execute a command
  17112.                       once for each file you select, or have it create a list
  17113.                       of files for a command to work with.  The command can
  17114.                       be a 4DOS internal command or alias, an external
  17115.                       command, or a batch file.
  17116.  
  17117.                       If you use parentheses around the files, SELECT
  17118.                       executes the command once for each file you have
  17119.                       selected.  During each execution, one of the selected
  17120.                       files is passed to the command as an argument.  If you
  17121.                       use square brackets around files, the SELECTed files
  17122.                       are combined into a single list, separated by spaces.
  17123.                       The command is then executed once with the entire list
  17124.                       presented as its command-line arguments.
  17125.  
  17126.                       SELECT uses the cursor up, cursor down, PgUp, and PgDn
  17127.                       keys to scroll through the file list.  Use the + key or
  17128.                       the spacebar to select a file (or unselect a marked
  17129.                       file), and the - key to unselect a file.  The * key
  17130.                       will reverse all of the current marks (excluding
  17131.                       subdirectories), and the / key will unmark everything.
  17132.                       After marking the files, press Enter to execute the
  17133.                       command.
  17134.  
  17135.                       You can select a single file by moving the scroll bar
  17136.                       to the filename and pressing Enter without marking any
  17137.                       other files.
  17138.  
  17139.                       To skip the files listed in the current display and go
  17140.                       on to the next file specification inside the
  17141.  
  17142.  
  17143.           ___________________________________________________________________
  17144.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  293
  17145.  
  17146.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SELECT
  17147.           ___________________________________________________________________
  17148.  
  17149.  
  17150.                       parentheses or brackets (if any), press the Escape key.
  17151.                       To cancel the current SELECT command entirely, press
  17152.                       Ctrl-C or Ctrl-Break.
  17153.  
  17154.                       In the simplest form of SELECT, you merely specify the
  17155.                       command and then the list of files from which you will
  17156.                       make your selection(s).  For example:
  17157.  
  17158.                            c:\> select copy (*.com *.exe) a:\
  17159.  
  17160.                       will let you select from among the .COM and .EXE files
  17161.                       on the current drive.  It will then invoke the COPY
  17162.                       command to copy each file you select to drive A:.  You
  17163.                       will be able to select first from a list of all .COM
  17164.                       files in the current directory, and then from a list of
  17165.                       all .EXE files.
  17166.  
  17167.                       If you want to select from a list of all the .COM and
  17168.                       .EXE files mixed together, create an include list
  17169.                       inside the parentheses by inserting a semi-colon (see
  17170.                       page 75 for information on include lists):
  17171.  
  17172.                            c:\> select copy (*.com;*.exe) a:\
  17173.  
  17174.                       Finally, if you want the SELECT command to send a
  17175.                       single list of files to COPY, instead of invoking COPY
  17176.                       once for each file you select, put the file names in
  17177.                       square brackets instead of parentheses:
  17178.  
  17179.                            c:\> select copy [*.com;*.exe] a:\
  17180.  
  17181.                       If you use brackets, you have to be sure that the
  17182.                       resulting command (the word COPY, the list of files,
  17183.                       and the destination drive in this example) is no more
  17184.                       than 127 characters long for external commands and no
  17185.                       more than 255 characters long for internal 4DOS
  17186.                       commands.  The current line length is displayed by
  17187.                       SELECT while you are marking files to help you to
  17188.                       conform to these limits.
  17189.  
  17190.                       The parentheses or brackets enclosing the file name(s)
  17191.                       can appear anywhere within the command; SELECT assumes
  17192.                       that the first set of parentheses or brackets it finds
  17193.                       is the one containing the list of files from which you
  17194.                       wish to make your selection.
  17195.  
  17196.                   ##  If you don't specify a command, the selected
  17197.                       filename(s) will become the command.  For example, this
  17198.  
  17199.  
  17200.           ___________________________________________________________________
  17201.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  294
  17202.  
  17203.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SELECT
  17204.           ___________________________________________________________________
  17205.  
  17206.  
  17207.                       command defines an alias called UTILS that selects from
  17208.                       the executable files in the directory C:\UTIL, and then
  17209.                       executes them in the order marked (enter the alias on
  17210.                       one line):
  17211.  
  17212.                            c:\> alias utils select
  17213.                                  (c:\util\*.com;*.exe;*.btm;*.bat)
  17214.  
  17215.                   ##  If you want to use filename completion (see page 59) to
  17216.                       enter the filenames inside the parentheses, type a
  17217.                       space after the opening parenthesis.  Otherwise the
  17218.                       command line editor will treat the open parenthesis as
  17219.                       the first character of the filename.
  17220.  
  17221.                   ##  You can set the default colors used by SELECT (and
  17222.                       LIST) using the ListColors directive in 4DOS.INI (see
  17223.                       page 132).  If ListColors is not used, the default
  17224.                       colors will be set by the StdColors directive (page
  17225.                       132) or by the last CLS or COLOR command.
  17226.  
  17227.                   ##  If you have an ANSI driver loaded, you can display the
  17228.                       filenames in color by setting the COLORDIR environment
  17229.                       variable (the same colors will be used by the DIR
  17230.                       command).  The format for COLORDIR is:
  17231.  
  17232.                            ext ... :[BRIght][BLInk] fg [ON bg]; ...
  17233.  
  17234.                       where ext is the file extension, or one of the
  17235.                       following file attributes:
  17236.  
  17237.                            DIRS      directory
  17238.                            RDONLY    read-only file
  17239.                            HIDDEN    hidden file
  17240.                            SYSTEM    system file
  17241.                            ARCHIVE   file modified since last backup.
  17242.  
  17243.                       For example, to display the .COM and .EXE files in red,
  17244.                       the .C and .ASM files in bright cyan, and the read-only
  17245.                       files in blinking green (enter this on one line):
  17246.  
  17247.                            c:\> set colordir=com exe:red; c asm:bright cyan;
  17248.                                 rdonly:blink green
  17249.  
  17250.                       If you don't specify a background color, SELECT will
  17251.                       use the current screen background color from the
  17252.                       ListColors or StdColors directive or the last CLS or
  17253.                       COLOR command (as described above).  COLORDIR will not
  17254.                       work properly unless you have an ANSI driver loaded.
  17255.  
  17256.  
  17257.           ___________________________________________________________________
  17258.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  295
  17259.  
  17260.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SELECT
  17261.           ___________________________________________________________________
  17262.  
  17263.  
  17264.  
  17265.                       You can disable directory colorization within SELECT
  17266.                       with the /D option.
  17267.  
  17268.                       When displaying file descriptions, SELECT adds a right
  17269.                       arrow at the end of the line if the description is too
  17270.                       long to fit on the screen.  This symbol will alert you
  17271.                       to the existence of additional description text.
  17272.  
  17273.                   ##  Extended wildcards (for example "BA[KXC]" for .BAK,
  17274.                       .BAX, and .BAC files) can be used in directory color
  17275.                       specifications.  See page 71 for more information on
  17276.                       extended wildcards.
  17277.  
  17278.                   ##  When sorting file names and extensions for the SELECT
  17279.                       display, 4DOS normally assumes that sequences of digits
  17280.                       should be sorted numerically (for example, the file
  17281.                       DRAW2 would come before DRAW03 because 2 is numerically
  17282.                       larger than 03), rather than strictly alphabetically
  17283.                       (where DRAW2 would come second because "2" is more than
  17284.                       "0").  You can defeat this behavior and force a strict
  17285.                       alphabetic sort with the /O:a option.
  17286.  
  17287.                   ##  You may need to increase 4DOS's internal stack size
  17288.                       using the StackSize directive in 4DOS.INI if you use
  17289.                       extremely complex combinations of commands like EXCEPT,
  17290.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  17291.                       or use complex combinations of these commands in nested
  17292.                       batch files or nested GOSUBs.  See the StackSize
  17293.                       directive on page 140 for more information.
  17294.  
  17295.           Options:##  /A(ttribute select):  Display only those files that
  17296.                       have the specified attribute set.  Preceding the
  17297.                       attribute character with a minus [-] will display those
  17298.                       files that DON'T have that attribute set.  Attributes
  17299.                       can also be combined.  The attributes are:
  17300.  
  17301.                            R    Read-only         D    Subdirectory
  17302.                            H    Hidden            A    Archive
  17303.                            S    System
  17304.  
  17305.                       If no attributes are listed at all (e.g. SELECT /A
  17306.                       ...), SELECT will display all files and subdirectories
  17307.                       including hidden and system files.  If attributes are
  17308.                       combined, all the specified attributes must match for a
  17309.                       file to be included in the listing.  For example,
  17310.                       /A:RHS will display only those files with all three
  17311.  
  17312.  
  17313.  
  17314.           ___________________________________________________________________
  17315.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  296
  17316.  
  17317.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SELECT
  17318.           ___________________________________________________________________
  17319.  
  17320.  
  17321.                       attributes set.  See page 183 for more information on
  17322.                       file attributes.
  17323.  
  17324.                       /C(ase):  Display filenames in the traditional upper
  17325.                       case format; also see SETDOS /U and the UpperCase
  17326.                       directive in 4DOS.INI.
  17327.  
  17328.                   ##  /D(isable colorization):  Temporarily turn off
  17329.                       directory colorization within SELECT.
  17330.  
  17331.                       /O(rder):  Set the sort order for the files.  The order
  17332.                       can be any combination of the following options:
  17333.  
  17334.                            -    Reverse the sort order for the next option
  17335.                            a    Sort names and extensions in standard ASCII
  17336.                                 order, rather than sorting numerically when
  17337.                                 digits are included in the name or extension
  17338.                            d    Sort by date and time (oldest first)
  17339.                            e    Sort by extension
  17340.                            g    Group subdirectories together
  17341.                            i    Sort by the file description
  17342.                            n    Sort by filename (this is the default)
  17343.                            r    Reverse the sort order for all options
  17344.                            s    Sort by size
  17345.                            u    Unsorted
  17346.  
  17347.  
  17348.  
  17349.  
  17350.  
  17351.  
  17352.  
  17353.  
  17354.  
  17355.  
  17356.  
  17357.  
  17358.  
  17359.  
  17360.  
  17361.  
  17362.  
  17363.  
  17364.  
  17365.  
  17366.  
  17367.  
  17368.  
  17369.  
  17370.  
  17371.           ___________________________________________________________________
  17372.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  297
  17373.  
  17374.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SET
  17375.           ___________________________________________________________________
  17376.  
  17377.  
  17378.           SET                                                      (Enhanced)
  17379.  
  17380.           Purpose:    Display, create, modify, or delete environment
  17381.                       variables.
  17382.  
  17383.           Format:     SET [/M /P /R filename...] [name[=][value]]
  17384.  
  17385.                       filename:  The name of a file containing variable
  17386.                       definitions.
  17387.                       name:  The name of the environment variable to define
  17388.                       or modify.
  17389.                       value:  The new value for the variable.
  17390.  
  17391.                       /M(aster)                   /R(ead from file)
  17392.                       /P(ause)
  17393.  
  17394.                       See also: UNSET and ESET.
  17395.  
  17396.           Usage:      Every program and command inherits an environment,
  17397.                       which is a list of variable names, each of which is
  17398.                       followed by an equal sign and some text.  Many programs
  17399.                       use entries in the environment to modify their own
  17400.                       actions.  4DOS itself uses several environment
  17401.                       variables (see page 116).  See page 78 for more
  17402.                       information on the environment.
  17403.  
  17404.                       If you simply type the SET command with no options or
  17405.                       arguments, it will display all the names and values
  17406.                       currently stored in the environment.  Typically, you
  17407.                       will see an entry called COMSPEC, an entry called PATH,
  17408.                       an entry called CMDLINE, and whatever other environment
  17409.                       variables you and your programs have established:
  17410.  
  17411.                            c:\> set
  17412.                            COMSPEC=C:\4DOS.COM
  17413.                            PATH=C:\;C:\DOS;C:\UTIL
  17414.                            CMDLINE=E:\UTIL\MAPMEM.EXE
  17415.  
  17416.                       To add a variable to the environment, type SET plus the
  17417.                       variable name, an equal sign, and the text:
  17418.  
  17419.                            c:\> set mine=c:\finance\myfiles
  17420.  
  17421.                       4DOS will convert the variable name to upper case but
  17422.                       leave the text after the equal sign just as you entered
  17423.                       it.  If the variable already exists, its value will be
  17424.                       replaced with the new text that you entered.
  17425.  
  17426.  
  17427.  
  17428.           ___________________________________________________________________
  17429.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  298
  17430.  
  17431.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SET
  17432.           ___________________________________________________________________
  17433.  
  17434.  
  17435.  
  17436.                       Normally you should not put a space on either side of
  17437.                       the equal sign.  A space before the equal sign will
  17438.                       become part of the name; a space after the equal sign
  17439.                       will become part of the value.
  17440.  
  17441.                       To display the contents of a single variable, type SET
  17442.                       plus the variable name:
  17443.  
  17444.                            c:\> set mine
  17445.  
  17446.                       You can edit environment variables with the ESET
  17447.                       command.  To remove variables from the environment, use
  17448.                       UNSET, or type SET plus a variable name and an equal
  17449.                       sign:
  17450.  
  17451.                            c:\> set mine=
  17452.  
  17453.                       4DOS limits the variable name to a maximum of 80
  17454.                       characters, and the name plus the value to a maximum of
  17455.                       255 characters.
  17456.  
  17457.                   ##  Unless you use /M, SET only affects the environment of
  17458.                       the current command processor and the programs it
  17459.                       executes.  If you EXIT to a parent command processor,
  17460.                       the original environment will be unchanged.
  17461.  
  17462.                       The size of the environment is specified by the
  17463.                       Environment and EnvFree directives in 4DOS.INI (see
  17464.                       page 126) or by the /E: startup switch (see page 112).
  17465.  
  17466.           Options:##  /M(aster):  Display or modify the master environment
  17467.                       rather than the local environment.  This option only
  17468.                       makes sense in a secondary command processor.
  17469.  
  17470.                       /P(ause):  Pause after displaying each page of
  17471.                       environment entries.  Press Ctrl-C to quit, or any
  17472.                       other key to display the next page.
  17473.  
  17474.                   ##  /R(ead):  Read environment variables from a file.  This
  17475.                       is much faster than loading variables from a batch file
  17476.                       with multiple SET commands.  The file is in the same
  17477.                       format as the SET display, so SET /R can accept as
  17478.                       input a file generated by redirecting SET output.  For
  17479.                       example, the following commands will save the
  17480.                       environment variables to a file, and then reload them
  17481.                       from that file:
  17482.  
  17483.  
  17484.  
  17485.           ___________________________________________________________________
  17486.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  299
  17487.  
  17488.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SET
  17489.           ___________________________________________________________________
  17490.  
  17491.  
  17492.  
  17493.                                 set > varlist
  17494.                                 set /r varlist
  17495.  
  17496.                       You can load variables from multiple files by listing
  17497.                       the filenames individually after the /R.  You can add
  17498.                       comments to a variable file by starting the comment
  17499.                       line with a colon [:].  Lines in a SET /R file can be
  17500.                       up to 511 characters long.
  17501.  
  17502.  
  17503.  
  17504.  
  17505.  
  17506.  
  17507.  
  17508.  
  17509.  
  17510.  
  17511.  
  17512.  
  17513.  
  17514.  
  17515.  
  17516.  
  17517.  
  17518.  
  17519.  
  17520.  
  17521.  
  17522.  
  17523.  
  17524.  
  17525.  
  17526.  
  17527.  
  17528.  
  17529.  
  17530.  
  17531.  
  17532.  
  17533.  
  17534.  
  17535.  
  17536.  
  17537.  
  17538.  
  17539.  
  17540.  
  17541.  
  17542.           ___________________________________________________________________
  17543.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  300
  17544.  
  17545.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SETDOS
  17546.           ___________________________________________________________________
  17547.  
  17548.  
  17549.           SETDOS                                                        (New)
  17550.  
  17551.           Purpose:    Display or set the 4DOS configuration.
  17552.  
  17553.           Format:     SETDOS [/A? /C? /E? /I+|- command /L? /M? /N? /R? /S?:?
  17554.                            /U? /V?]
  17555.  
  17556.                       /A(NSI)                     /N(o clobber)
  17557.                       /C(ompound)                 /P(arameter character)
  17558.                       /E(scape character)         /R(ows)
  17559.                       /I(nternal commands)        /S(hape of cursor)
  17560.                       /L(ine)                     /U(pper case)
  17561.                       /M(ode for editing)         /V(erbose)
  17562.  
  17563.           Usage:      SETDOS allows you to customize certain aspects of 4DOS
  17564.                       to suit your personal tastes or the configuration of
  17565.                       your system.  Each of these options is described below.
  17566.  
  17567.                       You can display the value of all SETDOS options by
  17568.                       entering the SETDOS command with no parameters.
  17569.  
  17570.                       Most of the SETDOS options can be initialized when 4DOS
  17571.                       starts through directives in the 4DOS.INI file (see
  17572.                       page 129).  The name of the corresponding directive is
  17573.                       listed in square brackets [ ] with each option;  if
  17574.                       none is listed, that option cannot be set from the
  17575.                       4DOS.INI file.  You can also define the SETDOS options
  17576.                       in your AUTOEXEC.BAT or 4START file, in aliases, or at
  17577.                       the command line.
  17578.  
  17579.                       Secondary shells automatically inherit most
  17580.                       configuration settings currently in effect in the
  17581.                       previous shell.  If values have been changed by SETDOS
  17582.                       since 4DOS started, the new values will be passed to
  17583.                       the secondary shell.  For details on inheritance of
  17584.                       SETDOS values by secondary shells and their
  17585.                       relationship to 4DOS.INI, see page 122.
  17586.  
  17587.                       SETDOS /I settings are not inherited by secondary
  17588.                       shells.  If you want to use SETDOS /I- to disable
  17589.                       commands in all shells, place the SETDOS command(s) in
  17590.                       your 4START file (see page 118), which is executed when
  17591.                       any shell starts.
  17592.  
  17593.                       Many of the options below are marked with## .  If you
  17594.                       are a new user, skip these and read the /M, /S, and /U
  17595.                       options, which are more common.
  17596.  
  17597.  
  17598.  
  17599.           ___________________________________________________________________
  17600.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  301
  17601.  
  17602.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SETDOS
  17603.           ___________________________________________________________________
  17604.  
  17605.  
  17606.  
  17607.           Options:##  /A(NSI)  [ANSI]:  The ANSI option determines whether
  17608.                       4DOS will attempt to use ANSI escape sequences for the
  17609.                       CLS and COLOR commands.  4DOS normally determines this
  17610.                       itself, but if you are using a non-standard ANSI driver
  17611.                       or your loading sequence is unusual, you may need to
  17612.                       explicitly inform 4DOS.  /A0 allows 4DOS to determine
  17613.                       whether an ANSI driver is installed (the default).
  17614.                       /A1 forces 4DOS to assume an ANSI driver is installed.
  17615.                       /A2 forces 4DOS to assume an ANSI driver is not
  17616.                       installed.
  17617.  
  17618.                   ##  /C(ompound character)  [CommandSep]:  The COMPOUND
  17619.                       option sets the character used for separating multiple
  17620.                       commands on the same line.  The default is the caret
  17621.                       [^].  You cannot use any of the redirection characters
  17622.                       (| > <), or any of the whitespace characters (blank,
  17623.                       tab, comma, or equal sign) as the command separator.
  17624.                       This example changes the COMPOUND character to a tilde
  17625.                       [~]:
  17626.  
  17627.                            c:\> setdos /c~
  17628.  
  17629.                   ##  /E(scape character)  [EscapeChar]:  The ESCAPE option
  17630.                       sets the character used to suppress the normal meaning
  17631.                       of the following character.  Any character following
  17632.                       the escape character will be passed unmodified to the
  17633.                       command line.  For example, you could include a
  17634.                       redirection character such as > as part of a command-
  17635.                       line argument if the character was preceded by the
  17636.                       escape character.  The default escape character is
  17637.                       Ctrl-X (ASCII 24; appears on screen as an up-arrow).
  17638.                       You cannot use any of the redirection characters (| >
  17639.                       <) or the whitespace characters (blank, tab, comma, or
  17640.                       equal sign) as the escape character.  Certain
  17641.                       characters (b, e, f, n, r, and t)  have special
  17642.                       meanings when immediately preceded by the escape
  17643.                       character.  See page 94 for additional details.
  17644.  
  17645.                   ##  /I(nternal):  The INTERNAL option allows you to disable
  17646.                       or enable internal 4DOS commands.  To disable a
  17647.                       command, precede the command name with a minus [-].  To
  17648.                       re-enable a command, precede it with a plus [+].  For
  17649.                       example, to disable the internal LIST command to force
  17650.                       4DOS to use an external command:
  17651.  
  17652.                            c:\> setdos /i-list
  17653.  
  17654.  
  17655.  
  17656.           ___________________________________________________________________
  17657.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  302
  17658.  
  17659.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SETDOS
  17660.           ___________________________________________________________________
  17661.  
  17662.  
  17663.  
  17664.                   ##  /L(ine)  [LineInput]:  The LINE option controls how
  17665.                       4DOS gets its input from the command line.  /L0 tells
  17666.                       4DOS to use character input (the default).  /L1 tells
  17667.                       4DOS to use line input (via DOS  service INT 21h
  17668.                       function 0Ah, like COMMAND.COM).  /L1 will disable
  17669.                       command line editing, history recall, and filename
  17670.                       completion; it should only be used if it is needed for
  17671.                       compatibility with a specific program.  If you have a
  17672.                       program that requires line input, you can use the
  17673.                       following line in an alias or batch file to change the
  17674.                       line input option just for that single program:
  17675.  
  17676.                            setdos /L1 ^ program %& ^ setdos /L0
  17677.  
  17678.                       See the file APPNOTES.DOC for information on programs
  17679.                       which require this option.
  17680.  
  17681.                       /M(ode)  [EditMode]:  The MODE option controls the
  17682.                       initial line editing mode.  /M0 forces 4DOS to start
  17683.                       editing in overstrike mode (the default).  /M1 forces
  17684.                       4DOS to start editing in insert mode.
  17685.  
  17686.                   ##  /N(o clobber)  [NoClobber]:  The NOCLOBBER option
  17687.                       controls output redirection (see page 66).  /N0 means
  17688.                       existing files will be overwritten by simple
  17689.                       redirection (with >) and that appending (with >>) does
  17690.                       not require the file to exist already.  This is the
  17691.                       default.  /N1 means existing files may not be
  17692.                       overwritten by simple output redirection, and that when
  17693.                       appending the output file must exist.  A /N1 setting
  17694.                       can be overridden with the [!] character.  If you use
  17695.                       /N1, you may have problems with a few unusual programs
  17696.                       that shell to DOS to run a command with redirection,
  17697.                       and expect to be able to overwrite an existing file.
  17698.  
  17699.                   ##  /P(arameter character)  [ParameterChar]:   This option
  17700.                       sets the character used to specify all or all remaining
  17701.                       command line arguments.  The default is '&' (as in
  17702.                       "%&") for 4DOS and '$' (as in "%$") for 4OS2.  Use
  17703.                       SETDOS /P$ to set the 4DOS character to match 4OS2.
  17704.  
  17705.                   ##  /R(ows)  [ScreenRows]:  The ROWS option sets the number
  17706.                       of screen rows used by the video display.  Normally
  17707.                       4DOS detects the screen size, but if you have a non-
  17708.                       standard display you may need to set it explicitly.
  17709.                       This option does not affect screen scrolling (that is
  17710.                       controlled by your video BIOS or ANSI.SYS); it is used
  17711.  
  17712.  
  17713.           ___________________________________________________________________
  17714.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  303
  17715.  
  17716.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SETDOS
  17717.           ___________________________________________________________________
  17718.  
  17719.  
  17720.                       only for LIST, SELECT, the paged output options (i.e.,
  17721.                       TYPE /P), and error checking in the screen output
  17722.                       commands.
  17723.  
  17724.                       /S(hape)  [CursorOver, CursorIns]:  The SHAPE option
  17725.                       sets the 4DOS cursor shape.  The format is /So:i where
  17726.                       o is the cursor size for overstrike mode, i the cursor
  17727.                       size for insert mode.  The size is entered as a
  17728.                       percentage of the total character height.  The default
  17729.                       values are 10:100 (an underscore cursor for overstrike
  17730.                       mode, and a block cursor for insert mode).  Because of
  17731.                       the way video BIOSes remap the cursor shape, you may
  17732.                       not get a smooth progression in the cursor size from 0%
  17733.                       - 100%.  To disable the cursor, enter /S0:0.
  17734.  
  17735.                       /U(pper)  [UpperCase]:  The UPPER option controls the
  17736.                       default case (upper or lower) for filenames displayed
  17737.                       by 4DOS internal commands like COPY and DIR.  /U0
  17738.                       displays file names in lower case (the default).  /U1
  17739.                       displays file names in the traditional upper case.
  17740.  
  17741.                   ##  /V(erbose)  [BatchEcho]:  The VERBOSE option controls
  17742.                       the default for command echoing in batch files.  /V0
  17743.                       disables echoing of batch file commands unless ECHO is
  17744.                       explicitly set ON.  /V1 enables echoing of batch file
  17745.                       commands unless ECHO is explicitly set OFF.  /V2 forces
  17746.                       echoing of all batch file commands, even if ECHO is set
  17747.                       OFF or the line begins with an "@".  /V2 is intended
  17748.                       for debugging, and can be set with SETDOS but cannot be
  17749.                       set with the BatchEcho directive in 4DOS.INI.  /V1 is
  17750.                       the default.
  17751.  
  17752.  
  17753.  
  17754.  
  17755.  
  17756.  
  17757.  
  17758.  
  17759.  
  17760.  
  17761.  
  17762.  
  17763.  
  17764.  
  17765.  
  17766.  
  17767.  
  17768.  
  17769.  
  17770.           ___________________________________________________________________
  17771.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  304
  17772.  
  17773.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SETLOCAL
  17774.           ___________________________________________________________________
  17775.  
  17776.  
  17777.           SETLOCAL                                                      (New)
  17778.  
  17779.           Purpose:    Save a copy of the current disk drive, directory,
  17780.                       environment, and alias list.
  17781.  
  17782.           Format:     SETLOCAL
  17783.  
  17784.                       See also: ENDLOCAL.
  17785.  
  17786.           Usage:      SETLOCAL is used in batch files to save the default
  17787.                       disk drive and directory, the environment, and the
  17788.                       alias list to a reserved block of memory.  You can then
  17789.                       change their values and later restore the original
  17790.                       values with the ENDLOCAL command.
  17791.  
  17792.                       For example, this batch file fragment saves everything,
  17793.                       changes the disk and directory, modifies some
  17794.                       variables, runs a program, and then restores the
  17795.                       original values:
  17796.  
  17797.                            setlocal
  17798.                            cdd d:\test
  17799.                            set path=c:\;c:\dos;c:\util
  17800.                            set lib=d:\lib
  17801.                            rem run some program here
  17802.                            endlocal
  17803.  
  17804.                       SETLOCAL and ENDLOCAL are not nestable within a batch
  17805.                       file.  However, you can have multiple SETLOCAL /
  17806.                       ENDLOCAL pairs within a batch file, and nested batch
  17807.                       files can each have their own SETLOCAL / ENDLOCAL.  You
  17808.                       cannot use SETLOCAL in an alias or at the command line.
  17809.  
  17810.                   ##  4DOS automatically performs an ENDLOCAL at the end of a
  17811.                       batch file if you forget to do so.  If you invoke one
  17812.                       batch file from another without using CALL, the first
  17813.                       batch file is terminated, and an automatic ENDLOCAL is
  17814.                       performed.  The second batch file inherits the drive,
  17815.                       directory, aliases, and environment variables as they
  17816.                       were prior to any unterminated SETLOCAL.
  17817.  
  17818.                   ##  Do not load memory-resident programs (TSRs) from a
  17819.                       batch file while SETLOCAL is in effect.  If you do,
  17820.                       when ENDLOCAL is executed and the memory used by
  17821.                       SETLOCAL is released, a "hole" will be left in memory
  17822.                       below the TSR.  This is not usually harmful, but wastes
  17823.                       memory.
  17824.  
  17825.  
  17826.  
  17827.           ___________________________________________________________________
  17828.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  305
  17829.  
  17830.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SHIFT
  17831.           ___________________________________________________________________
  17832.  
  17833.  
  17834.           SHIFT                                                    (Enhanced)
  17835.  
  17836.           Purpose:    Allows the use of more than 127 replaceable parameters
  17837.                       in a batch file.
  17838.  
  17839.           Format:     SHIFT [n]
  17840.  
  17841.           Usage:      SHIFT is provided for compatibility with older batch
  17842.                       files, where it was used to access more than 10
  17843.                       replaceable parameters.  4DOS supports 128 replaceable
  17844.                       parameters (%0 to %127), so you may not need to use
  17845.                       SHIFT for batch files running exclusively under 4DOS.
  17846.  
  17847.                       SHIFT moves each of the batch file replaceable
  17848.                       parameters n positions to the left.  The default value
  17849.                       for n is 1.  SHIFT 1 moves the parameter in %1 to
  17850.                       position %0, the parameter in %2 becomes %1, etc.  You
  17851.                       can reverse a SHIFT by giving a negative value for n
  17852.                       (i.e., after SHIFT -1, the former %0 is restored, %0
  17853.                       becomes %1, %1 becomes %2, etc.).
  17854.  
  17855.                       SHIFT also affects the 4DOS parameters %n& (command
  17856.                       line tail) and %# (number of command arguments).
  17857.  
  17858.                       For example, create a batch file called TEST.BAT:
  17859.  
  17860.                            echo %1 %2 %3 %4
  17861.                            shift
  17862.                            echo %1 %2 %3 %4
  17863.                            shift 2
  17864.                            echo %1 %2 %3 %4
  17865.                            shift -1
  17866.                            echo %1 %2 %3 %4
  17867.  
  17868.                       Executing TEST.BAT produces the following results:
  17869.  
  17870.                            c:\> test zero one two three four five six
  17871.  
  17872.                            zero one two three
  17873.                            one two three four
  17874.                            three four five six
  17875.                            two three four five
  17876.  
  17877.  
  17878.  
  17879.  
  17880.  
  17881.  
  17882.  
  17883.  
  17884.           ___________________________________________________________________
  17885.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  306
  17886.  
  17887.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SWAPPING
  17888.           ___________________________________________________________________
  17889.  
  17890.  
  17891.           SWAPPING                                                      (New)
  17892.  
  17893.           Purpose:    Enable or disable 4DOS swapping, or display the
  17894.                       swapping state.
  17895.  
  17896.           Format:     SWAPPING [ON | OFF]
  17897.  
  17898.           ## Usage:   SWAPPING temporarily disables or enables the swapping
  17899.                       of the transient portion of 4DOS to EMS expanded
  17900.                       memory, to XMS extended memory, or to disk (see page
  17901.                       126).
  17902.  
  17903.                       Setting SWAPPING OFF is particularly useful for
  17904.                       speeding up batch files (including AUTOEXEC.BAT) when
  17905.                       4DOS is using disk swapping.  When you are running
  17906.                       several small programs from a batch file, disk swapping
  17907.                       can sometimes cause a noticeable delay.  However, if
  17908.                       you disable swapping, there will be about 92K less
  17909.                       memory available for large application programs.
  17910.  
  17911.                       The following batch file fragment disables swapping,
  17912.                       runs several programs, and then re-enables swapping:
  17913.  
  17914.                            swapping off
  17915.                            c:\util\mouse
  17916.                            c:\video\ansi.com
  17917.                            cls bright white on blue
  17918.                            c:\bin\cache.com
  17919.                            swapping on
  17920.  
  17921.                       If you enter SWAPPING with no arguments, 4DOS displays
  17922.                       the current swapping type (XMS, EMS, Disk, or None) and
  17923.                       state:
  17924.  
  17925.                            c:\> swapping
  17926.                            SWAPPING (XMS) is ON
  17927.  
  17928.                       Setting SWAPPING OFF does not close the disk swap file
  17929.                       or release any reserved EMS or XMS memory.
  17930.  
  17931.                       You may have trouble if you load memory-resident
  17932.                       programs (TSRs) with SWAPPING OFF and unload them with
  17933.                       SWAPPING ON, or vice versa.  Many TSRs expect the
  17934.                       system to be in the same state when they unload that it
  17935.                       was in when they loaded, and variation from this norm
  17936.                       may cause the TSR to unload improperly or hang your
  17937.                       system, requiring a reboot.
  17938.  
  17939.  
  17940.  
  17941.           ___________________________________________________________________
  17942.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  307
  17943.  
  17944.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TEE
  17945.           ___________________________________________________________________
  17946.  
  17947.  
  17948.           TEE                                                           (New)
  17949.  
  17950.           Purpose:    Copy standard input to both standard output and a file.
  17951.  
  17952.           Format:     TEE [/A] file...
  17953.  
  17954.                       file:  One or more files that will receive the "tee-d"
  17955.                       output.
  17956.  
  17957.                       /A(ppend)
  17958.  
  17959.                       See also: Y; redirection options (page 66).
  17960.  
  17961.           ## Usage:   Many programs get their input from "standard input" and
  17962.                       send their output to "standard output," which are
  17963.                       normally the keyboard and video display (known
  17964.                       collectively as the console or CON).  You can redirect
  17965.                       both the input and output of such programs, for
  17966.                       example, using a file either to provide the input or
  17967.                       collect the output.
  17968.  
  17969.                       TEE gets its input from standard input and sends out
  17970.                       two copies: one goes to standard output, the other to
  17971.                       the file or files that you specify.  It is most often
  17972.                       used with a redirection pipe [|] to capture
  17973.                       intermediate output before the data is altered by
  17974.                       another program or command.
  17975.  
  17976.                       For example, to search the file DOC for any lines
  17977.                       containing the string "4DOS", make a copy of the
  17978.                       matching lines in 4.DAT, sort the lines, and write them
  17979.                       to the output file 4D.DAT:
  17980.  
  17981.                            c:\> find "4DOS" doc | tee 4.dat | sort > 4d.dat
  17982.  
  17983.                       If you are typing at the keyboard to produce the input
  17984.                       for TEE, you must enter a Ctrl-Z to terminate the
  17985.                       input.
  17986.  
  17987.           Option:     /A(ppend):  Add the output to the file(s) rather than
  17988.                       overwriting them.
  17989.  
  17990.  
  17991.  
  17992.  
  17993.  
  17994.  
  17995.  
  17996.  
  17997.  
  17998.           ___________________________________________________________________
  17999.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  308
  18000.  
  18001.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TEXT
  18002.           ___________________________________________________________________
  18003.  
  18004.  
  18005.           TEXT                                                          (New)
  18006.  
  18007.           Purpose:    Display a block of text in a batch file.
  18008.  
  18009.           Format:     TEXT
  18010.                            .
  18011.                            .
  18012.                            .
  18013.                       ENDTEXT
  18014.  
  18015.                       See also: ECHO, SCREEN, SCRPUT, and VSCRPUT.
  18016.  
  18017.           Usage:      The TEXT command is useful for displaying menus or
  18018.                       multi-line messages from a batch file.  TEXT will
  18019.                       display all subsequent lines in the batch file until
  18020.                       terminated by ENDTEXT.  Both TEXT and ENDTEXT must be
  18021.                       entered as the only command on the line.
  18022.  
  18023.                       If you have an ANSI driver loaded, you can change
  18024.                       screen colors by inserting ANSI escape sequences
  18025.                       anywhere in the text block.  You can also use a CLS or
  18026.                       COLOR command to set the screen color before executing
  18027.                       the TEXT command.
  18028.  
  18029.                       The following batch file fragment displays a simple
  18030.                       menu:
  18031.  
  18032.                            @echo off ^ cls ^ screen 2 0
  18033.                            text
  18034.                            Enter one of the following:
  18035.                            1 - Spreadsheet
  18036.                            2 - Word Processing
  18037.                            3 - DOS Utilities
  18038.                            Enter your selection :
  18039.                            endtext
  18040.  
  18041.  
  18042.  
  18043.  
  18044.  
  18045.  
  18046.  
  18047.  
  18048.  
  18049.  
  18050.  
  18051.  
  18052.  
  18053.  
  18054.  
  18055.           ___________________________________________________________________
  18056.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  309
  18057.  
  18058.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TIME
  18059.           ___________________________________________________________________
  18060.  
  18061.  
  18062.           TIME                                                   (Compatible)
  18063.  
  18064.           Purpose:    Display or set the current system time.
  18065.  
  18066.           Format:     TIME [hh[:mm[:ss]]] [AM | PM]
  18067.  
  18068.                       hh   hour,  0 - 23
  18069.                       mm   minute,  0 - 59
  18070.                       ss   second,  0 - 59
  18071.  
  18072.                       See also: CHCP and DATE.
  18073.  
  18074.           Usage:      If you don't enter any parameters, TIME will display
  18075.                       the current system time and prompt you for a new time.
  18076.                       Press ENTER if you don't wish to change the time;
  18077.                       otherwise, enter the new time:
  18078.  
  18079.                            c:\> time
  18080.                            Mon  Dec 2, 1991  9:30:10
  18081.                            New time (hh:mm:ss):
  18082.  
  18083.                       TIME defaults to 24-hour format, but you can optionally
  18084.                       enter the time in 12-hour format by appending an "am"
  18085.                       or "pm" to the time you enter.
  18086.  
  18087.                       For example, to enter the time as 9:30 am:
  18088.  
  18089.                            c:\> time 9:30 am
  18090.  
  18091.                       DOS adds the system time and date to the directory
  18092.                       entry of every file you create and modify.  If you keep
  18093.                       both the time and date accurate, you will have a record
  18094.                       of when you last updated each file.
  18095.  
  18096.                       The separator used by TIME depends on the country code
  18097.                       defined in the CONFIG.SYS file or by the CHCP command.
  18098.  
  18099.  
  18100.  
  18101.  
  18102.  
  18103.  
  18104.  
  18105.  
  18106.  
  18107.  
  18108.  
  18109.  
  18110.  
  18111.  
  18112.           ___________________________________________________________________
  18113.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  310
  18114.  
  18115.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TIMER
  18116.           ___________________________________________________________________
  18117.  
  18118.  
  18119.           TIMER                                                         (New)
  18120.  
  18121.           Purpose:    TIMER is a system stopwatch.
  18122.  
  18123.           Format:     TIMER [ON] [/1 /2 /3 /S]
  18124.  
  18125.                       ON:  Force the stopwatch to restart
  18126.  
  18127.                       /1 (stopwatch #1)           /3 (stopwatch #3)
  18128.                       /2 (stopwatch #2)           /S(plit)
  18129.  
  18130.           Usage:      The TIMER command turns a system stopwatch on and off.
  18131.                       When you first run TIMER, the stopwatch starts:
  18132.  
  18133.                            c:\> timer
  18134.                            Timer 1 on:  12:21:46
  18135.  
  18136.                       When you run TIMER again, the stopwatch stops and the
  18137.                       elapsed time is displayed:
  18138.  
  18139.                            c:\> timer
  18140.                            Timer 1 off:  12:21:58    Elapsed time:
  18141.                            0:00:12.06
  18142.  
  18143.                       There are three stopwatches available (1, 2, and 3) so
  18144.                       you can time multiple overlapping events.  By default,
  18145.                       TIMER uses stopwatch #1.
  18146.  
  18147.                       TIMER is particularly useful for timing events in batch
  18148.                       files.  For example, to time both an entire batch file,
  18149.                       and an intermediate section of the same file, you could
  18150.                       use commands like this:
  18151.  
  18152.                            rem Turn on timer 1
  18153.                            timer
  18154.                            rem Do some work here
  18155.                            rem Turn timer 2 on to time the next section
  18156.                            timer /2
  18157.                            rem Do some more work
  18158.                            echo Intermediate section completed
  18159.                            rem Display time taken in intermediate section
  18160.                            timer /2
  18161.                            rem Do some more work
  18162.                            rem Now display the total time
  18163.                            timer
  18164.  
  18165.  
  18166.  
  18167.  
  18168.  
  18169.           ___________________________________________________________________
  18170.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  311
  18171.  
  18172.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TIMER
  18173.           ___________________________________________________________________
  18174.  
  18175.  
  18176.  
  18177.                       The smallest interval TIMER can measure is .06 second;
  18178.                       the largest interval is 23 hours, 59 minutes, 59.99
  18179.                       seconds.
  18180.  
  18181.           Options:    /1:  Use timer #1 (the default).
  18182.  
  18183.                       /2:  Use timer #2.
  18184.  
  18185.                       /3:  Use timer #3.
  18186.  
  18187.                       /S(plit):  Display a split time without stopping the
  18188.                       timer.  To display the current elapsed time but leave
  18189.                       the timer running:
  18190.  
  18191.                            c:\> timer /s
  18192.                            Timer 1 elapsed: 0:06:40.63
  18193.  
  18194.                       ON:   Start the timer regardless of its previous state
  18195.                       (on or off).  Otherwise the TIMER command toggles the
  18196.                       timer state (unless /S is used).
  18197.  
  18198.  
  18199.  
  18200.  
  18201.  
  18202.  
  18203.  
  18204.  
  18205.  
  18206.  
  18207.  
  18208.  
  18209.  
  18210.  
  18211.  
  18212.  
  18213.  
  18214.  
  18215.  
  18216.  
  18217.  
  18218.  
  18219.  
  18220.  
  18221.  
  18222.  
  18223.  
  18224.  
  18225.  
  18226.           ___________________________________________________________________
  18227.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  312
  18228.  
  18229.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TRUENAME
  18230.           ___________________________________________________________________
  18231.  
  18232.  
  18233.           TRUENAME                                                      (New)
  18234.  
  18235.           Purpose:    Find the full, true path and file name for a file.
  18236.  
  18237.           Format:     TRUENAME file
  18238.  
  18239.                       file:  The file whose name TRUENAME will report.
  18240.  
  18241.                       See also: @truename variable function on page 90.
  18242.  
  18243.           Usage:      Default directories, as well as the JOIN and SUBST
  18244.                       external commands, can obscure the true name of a file.
  18245.                       TRUENAME "sees through" these obstacles and reports the
  18246.                       fully qualified name of a file.
  18247.  
  18248.                       The following example uses TRUENAME to get the true
  18249.                       pathname for a file:
  18250.  
  18251.                            c:\> subst d: c:\util\test
  18252.                            c:\> truename d:\test.exe
  18253.                            c:\util\test\test.exe
  18254.  
  18255.                       TRUENAME requires MS-DOS or PC-DOS 3.0 or above.
  18256.  
  18257.  
  18258.  
  18259.  
  18260.  
  18261.  
  18262.  
  18263.  
  18264.  
  18265.  
  18266.  
  18267.  
  18268.  
  18269.  
  18270.  
  18271.  
  18272.  
  18273.  
  18274.  
  18275.  
  18276.  
  18277.  
  18278.  
  18279.  
  18280.  
  18281.  
  18282.  
  18283.           ___________________________________________________________________
  18284.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  313
  18285.  
  18286.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TYPE
  18287.           ___________________________________________________________________
  18288.  
  18289.  
  18290.           TYPE                                                     (Enhanced)
  18291.  
  18292.           Purpose:    Display the contents of the specified file(s).
  18293.  
  18294.           Format:     TYPE [/L /P] file...
  18295.  
  18296.                       file:  The file or list of files that you want to
  18297.                       display.
  18298.  
  18299.                       /L(ine numbers)             /P(ause)
  18300.  
  18301.                       See also: LIST.
  18302.  
  18303.           Usage:      The TYPE command displays a file.  It is normally only
  18304.                       useful for displaying ASCII text files.  Executable
  18305.                       files (.COM and .EXE) and many data files may be
  18306.                       unreadable when displayed with TYPE because they
  18307.                       include non-alphanumeric characters.
  18308.  
  18309.                       To display the files MEMO1 and MEMO2:
  18310.  
  18311.                            c:\> type /p memo1 memo2
  18312.  
  18313.                       You can press Ctrl-S to pause TYPE's display and then
  18314.                       any key to continue.
  18315.  
  18316.                       You will probably find LIST to be more useful for
  18317.                       displaying files.  However, the TYPE /L command used
  18318.                       with redirection (see page 66) is useful if you want to
  18319.                       add line numbers to a file.
  18320.  
  18321.           Options:    /L(ine numbers):  Print a line number preceding each
  18322.                       line of text.
  18323.  
  18324.                       /P(ause):  Wait for a keystroke after displaying each
  18325.                       page.  Press Ctrl-C to quit, or any other key to
  18326.                       continue.
  18327.  
  18328.  
  18329.  
  18330.  
  18331.  
  18332.  
  18333.  
  18334.  
  18335.  
  18336.  
  18337.  
  18338.  
  18339.  
  18340.           ___________________________________________________________________
  18341.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  314
  18342.  
  18343.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  UNALIAS
  18344.           ___________________________________________________________________
  18345.  
  18346.  
  18347.           UNALIAS                                                       (New)
  18348.  
  18349.           Purpose:    Remove aliases from the alias list.
  18350.  
  18351.           Format:     UNALIAS [/Q] alias...
  18352.                            or
  18353.                       UNALIAS *
  18354.  
  18355.                       alias:  One or more aliases to remove from memory.
  18356.  
  18357.                       /Q(uiet)
  18358.  
  18359.                       See also: ALIAS and ESET.
  18360.  
  18361.           Usage:      4DOS maintains a list of the aliases that you have
  18362.                       defined.  The UNALIAS command will remove aliases from
  18363.                       that list.  You can remove one or more aliases by name,
  18364.                       or you can delete the entire alias list by using the
  18365.                       command UNALIAS *
  18366.  
  18367.                       For example, to remove the alias DDIR:
  18368.  
  18369.                            c:\> unalias ddir
  18370.  
  18371.                       To remove all the aliases:
  18372.  
  18373.                            c:\> unalias *
  18374.  
  18375.           Options:    /Q(uiet):  Prevents UNALIAS from displaying an error
  18376.                       message if one or more of the aliases does not exist.
  18377.                       This option is most useful in batch files, for removing
  18378.                       a group of aliases when some of the aliases may not
  18379.                       have been defined.
  18380.  
  18381.  
  18382.  
  18383.  
  18384.  
  18385.  
  18386.  
  18387.  
  18388.  
  18389.  
  18390.  
  18391.  
  18392.  
  18393.  
  18394.  
  18395.  
  18396.  
  18397.           ___________________________________________________________________
  18398.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  315
  18399.  
  18400.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  UNSET
  18401.           ___________________________________________________________________
  18402.  
  18403.  
  18404.           UNSET                                                         (New)
  18405.  
  18406.           Purpose:    Remove variables from the environment.
  18407.  
  18408.           Format:     UNSET  [/M /Q] name...
  18409.                            or
  18410.                       UNSET *
  18411.  
  18412.                       name:  One or more variables to remove from the
  18413.                       environment.
  18414.  
  18415.                       /M(aster environment)       /Q(uiet)
  18416.  
  18417.                       See also: SET and ESET.
  18418.  
  18419.           Usage:      See the SET command and page 78 for a discussion of
  18420.                       environment variables.
  18421.  
  18422.                       UNSET removes one or more variables from the
  18423.                       environment.  For example, to remove the variable
  18424.                       CMDLINE:
  18425.  
  18426.                            c:\> unset cmdline
  18427.  
  18428.                       If you use the command UNSET *, all of the environment
  18429.                       variables will be deleted:
  18430.  
  18431.                            c:\> unset *
  18432.  
  18433.                       UNSET is often used in conjunction with the SETLOCAL
  18434.                       and ENDLOCAL commands in order to clear the environment
  18435.                       of variables that may cause problems for some
  18436.                       applications.
  18437.  
  18438.                   !   Use caution when removing environment variables, and
  18439.                       especially when using UNSET *.  Many programs will not
  18440.                       work properly without certain environment variables;
  18441.                       4DOS itself depends on PATH and COMSPEC.
  18442.  
  18443.           Options:##  /M(aster):  Remove the variable from the master
  18444.                       environment rather than the local environment.  This
  18445.                       option only makes sense if used in a secondary command
  18446.                       processor.
  18447.  
  18448.                       /Q(uiet):  Prevents UNSET from displaying an error
  18449.                       message if one or more of the variables does not exist.
  18450.                       This option is most useful in batch files, for removing
  18451.  
  18452.  
  18453.  
  18454.           ___________________________________________________________________
  18455.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  316
  18456.  
  18457.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  UNSET
  18458.           ___________________________________________________________________
  18459.  
  18460.  
  18461.                       a group of variables when some of the variables may not
  18462.                       have been defined.
  18463.  
  18464.  
  18465.  
  18466.  
  18467.  
  18468.  
  18469.  
  18470.  
  18471.  
  18472.  
  18473.  
  18474.  
  18475.  
  18476.  
  18477.  
  18478.  
  18479.  
  18480.  
  18481.  
  18482.  
  18483.  
  18484.  
  18485.  
  18486.  
  18487.  
  18488.  
  18489.  
  18490.  
  18491.  
  18492.  
  18493.  
  18494.  
  18495.  
  18496.  
  18497.  
  18498.  
  18499.  
  18500.  
  18501.  
  18502.  
  18503.  
  18504.  
  18505.  
  18506.  
  18507.  
  18508.  
  18509.  
  18510.  
  18511.           ___________________________________________________________________
  18512.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  317
  18513.  
  18514.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  VER
  18515.           ___________________________________________________________________
  18516.  
  18517.  
  18518.           VER                                                      (Enhanced)
  18519.  
  18520.           Purpose:    Display the current 4DOS and DOS versions.
  18521.  
  18522.           Format:     VER [/R]
  18523.  
  18524.                       /R(evision level)
  18525.  
  18526.           Usage:      Both the 4DOS and DOS version numbers consist of a one-
  18527.                       digit major version number, a period, and a one- or
  18528.                       two-digit minor version number.  The VER command
  18529.                       displays both version numbers:
  18530.  
  18531.                            c:\> ver
  18532.  
  18533.                            4DOS 4.01   DOS 5.0
  18534.  
  18535.                       VER will automatically detect OS/2 and DR-DOS and
  18536.                       display the corresponding operating system name and
  18537.                       version number.  For example:
  18538.  
  18539.                            c:\> ver
  18540.  
  18541.                            4DOS 4.01   OS/2 2.0
  18542.  
  18543.           Option:     /R(evision level):  Display the 4DOS and DOS, OS/2, or
  18544.                       DR-DOS revision level; and whether DOS is loaded into
  18545.                       the high memory area (HMA), is resident in ROM, or is
  18546.                       in normal base memory.  The output from /R related to
  18547.                       DOS is only meaningful in MS-DOS or PC-DOS version 5.0
  18548.                       or above.
  18549.  
  18550.  
  18551.  
  18552.  
  18553.  
  18554.  
  18555.  
  18556.  
  18557.  
  18558.  
  18559.  
  18560.  
  18561.  
  18562.  
  18563.  
  18564.  
  18565.  
  18566.  
  18567.  
  18568.           ___________________________________________________________________
  18569.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  318
  18570.  
  18571.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  VERIFY
  18572.           ___________________________________________________________________
  18573.  
  18574.  
  18575.           VERIFY                                                 (Compatible)
  18576.  
  18577.           Purpose:    Enable or disable disk write verification or display
  18578.                       the verification state.
  18579.  
  18580.           Format:     VERIFY [ON | OFF]
  18581.  
  18582.           Usage:      DOS maintains an internal verify flag.  When the flag
  18583.                       is on, DOS attempts to verify each disk write by making
  18584.                       sure that the data written to the disk can be read back
  18585.                       successfully into the computer.  It does NOT compare
  18586.                       the data written with the data actually placed on disk.
  18587.  
  18588.                       If used without any parameters, VERIFY will display the
  18589.                       state of the DOS verify flag:
  18590.  
  18591.                            c:\> verify
  18592.                            VERIFY is OFF
  18593.  
  18594.                       VERIFY is off when the system boots up.  Once it is
  18595.                       turned on with the VERIFY ON command, it stays on until
  18596.                       you use the VERIFY OFF command or until you reboot.
  18597.  
  18598.                       Verification will slow your disk write operations
  18599.                       slightly.
  18600.  
  18601.  
  18602.  
  18603.  
  18604.  
  18605.  
  18606.  
  18607.  
  18608.  
  18609.  
  18610.  
  18611.  
  18612.  
  18613.  
  18614.  
  18615.  
  18616.  
  18617.  
  18618.  
  18619.  
  18620.  
  18621.  
  18622.  
  18623.  
  18624.  
  18625.           ___________________________________________________________________
  18626.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  319
  18627.  
  18628.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  VOL
  18629.           ___________________________________________________________________
  18630.  
  18631.  
  18632.           VOL                                                      (Enhanced)
  18633.  
  18634.           Purpose:    Display a disk volume label(s).
  18635.  
  18636.           Format:     VOL [d:] ...
  18637.  
  18638.                       d:  The drive or drives to search for labels.
  18639.  
  18640.           Usage:      Each disk may have a volume label, created when the
  18641.                       disk is formatted or with the DOS external LABEL
  18642.                       command.  Also, every floppy disk formatted with DOS
  18643.                       version 4.0 or above has a volume serial number.
  18644.  
  18645.                       The VOL command will display the volume label and, if
  18646.                       you are using DOS 4.0 or later, the volume serial
  18647.                       number of a disk volume.  If the disk doesn't have a
  18648.                       volume label, VOL will report that it is "unlabeled."
  18649.                       If you don't specify a drive, VOL displays information
  18650.                       about the current drive:
  18651.  
  18652.                            c:\> vol
  18653.                            Volume in drive C: is MYHARDDISK
  18654.  
  18655.                       If you are using DOS 4.0 or later, the disk serial
  18656.                       number will appear after the drive label or name.
  18657.  
  18658.                       To display the disk labels for drives A and B:
  18659.  
  18660.                            c:\> vol a: b:
  18661.                            Volume in drive A: is unlabeled
  18662.                            Volume in drive B: is BACKUP_2
  18663.  
  18664.  
  18665.  
  18666.  
  18667.  
  18668.  
  18669.  
  18670.  
  18671.  
  18672.  
  18673.  
  18674.  
  18675.  
  18676.  
  18677.  
  18678.  
  18679.  
  18680.  
  18681.  
  18682.           ___________________________________________________________________
  18683.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  320
  18684.  
  18685.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  VSCRPUT
  18686.           ___________________________________________________________________
  18687.  
  18688.  
  18689.           VSCRPUT                                                       (New)
  18690.  
  18691.           Purpose:    Display text vertically in the specified color.
  18692.  
  18693.           Format:     VSCRPUT  row col [BRIght] [BLInk] fg ON bg text
  18694.  
  18695.                       row:  Starting row number.
  18696.                       col:  Starting column number
  18697.                       fg:  Foreground text color
  18698.                       bg:  Background text color
  18699.                       text:  The text to display
  18700.  
  18701.                       The available colors are:
  18702.  
  18703.                         Black         Blue          Green         Red
  18704.                         Magenta       Cyan          Yellow        White
  18705.  
  18706.                       See also: SCRPUT.
  18707.  
  18708.           Usage:      VSCRPUT writes text vertically on the screen rather
  18709.                       than horizontally.  Like the SCRPUT command, it uses
  18710.                       the colors you specify to write the text.  VSCRPUT can
  18711.                       be used for simple graphs and charts generated by batch
  18712.                       files.
  18713.  
  18714.                       The row and column are zero-based, so on a standard 25
  18715.                       row by 80 column display, valid rows are 0 - 24 and
  18716.                       valid columns are 0 - 79.
  18717.  
  18718.                       Only the first three characters of the color name and
  18719.                       the attributes BRIGHT and BLINK are required.
  18720.  
  18721.                       The following batch file fragment displays an X and Y
  18722.                       axis and labels them:
  18723.  
  18724.                            cls bright white on blue
  18725.                            drawhline 20 10 40 1 bright white on blue
  18726.                            drawvline 2 10 19 1 bright white on blue
  18727.                            scrput 21 20 bright red on blue X axis
  18728.                            vscrput 8 9 bright red on blue Y axis
  18729.  
  18730.                       VSCRPUT checks for a valid row and column, and displays
  18731.                       a "Usage" error message if either value is out of
  18732.                       range.
  18733.  
  18734.  
  18735.  
  18736.  
  18737.  
  18738.  
  18739.           ___________________________________________________________________
  18740.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  321
  18741.  
  18742.                                     CHAPTER 8 / COMMAND REFERENCE GUIDE  /  Y
  18743.           ___________________________________________________________________
  18744.  
  18745.  
  18746.           Y                                                             (New)
  18747.  
  18748.           Purpose:    Copy standard input to standard output, and then copy
  18749.                       the specified file(s) to standard output.
  18750.  
  18751.           Format:     Y file ...
  18752.  
  18753.                       file:  The file or list of files to send to standard
  18754.                       output.
  18755.  
  18756.                       See also: TEE.
  18757.  
  18758.           ## Usage:   The Y command copies input from standard input (usually
  18759.                       the keyboard) to standard output (usually the screen).
  18760.                       Once the input ends, the named files are appended to
  18761.                       standard output.
  18762.  
  18763.                       For example, to get text from standard input, append
  18764.                       the files MEMO1 and MEMO2 to it, and send the output to
  18765.                       MEMOS:
  18766.  
  18767.                            c:\> y memo1 memo2 > memos
  18768.  
  18769.                       The Y command is most useful if you want to add
  18770.                       redirected data to the beginning of a file instead of
  18771.                       appending it to the end.
  18772.  
  18773.                       If you are typing at the keyboard to produce input text
  18774.                       for Y, you must enter a Ctrl-Z to terminate the input.
  18775.  
  18776.  
  18777.  
  18778.  
  18779.  
  18780.  
  18781.  
  18782.  
  18783.  
  18784.  
  18785.  
  18786.  
  18787.  
  18788.  
  18789.  
  18790.  
  18791.  
  18792.  
  18793.  
  18794.  
  18795.  
  18796.           ___________________________________________________________________
  18797.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  322
  18798.  
  18799.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18800.           ___________________________________________________________________
  18801.  
  18802.  
  18803.  
  18804.           APPENDIX A / 4DOS ERROR MESSAGES
  18805.  
  18806.  
  18807.           This appendix lists error messages generated by 4DOS, and includes
  18808.           a recommended course of action for most errors.  If you are unable
  18809.           to resolve the problem look through Chapter 7 / Using 4DOS With
  18810.           Your Hardware and Software, beginning on page 143, or contact JP
  18811.           Software for technical support (see page 7).
  18812.  
  18813.           Error messages relating to files are generally reports of errors
  18814.           returned by DOS.  You may find some of these messages (for example,
  18815.           "Access denied") vague enough that they are not always helpful.
  18816.           4DOS includes the file name in file error messages, but is often
  18817.           unable to determine a more accurate explanation of these DOS
  18818.           errors.  The message shown is the best information available based
  18819.           on the error codes returned by DOS.
  18820.  
  18821.           The following list includes all error messages, in alphabetical
  18822.           order:
  18823.  
  18824.               4DOS initialization error --:  An error occurred during the
  18825.               4DOS startup process.  Look up the rest of the message in this
  18826.               list for a more specific explanation.
  18827.  
  18828.               4DOS internal stack overflow:  You attempted to nest batch
  18829.               files or commands like EXCEPT, FOR, IF, IFF, GLOBAL, or SELECT
  18830.               too deep, and 4DOS ran out of stack space.  Restructure your
  18831.               command, alias, or batch file, or use the StackSize directive
  18832.               in 4DOS.INI to increase 4DOS's internal stack size.
  18833.  
  18834.               4DOS server error --:  An error occurred in communication
  18835.               between 4DOS's resident and transient portions.  Look up the
  18836.               rest of the message in this list for a more specific
  18837.               explanation.
  18838.  
  18839.               4DOS swapping failed, loading in non-swapping mode:  None of
  18840.               the swapping options worked, so 4DOS loaded in non-swapping
  18841.               mode, which requires about 92K more memory than swapping mode.
  18842.               Check your Swapping specification in 4DOS.INI, and/or free
  18843.               some XMS or EMS memory or disk space.
  18844.  
  18845.               4DOS unrecoverable error XX:  An error occurred in the
  18846.               resident portion of 4DOS.  These errors will terminate
  18847.               secondary shells and require a reboot if they occur during a
  18848.               primary shell or if 4DOS cannot continue.
  18849.  
  18850.                    BI    Bad server function code.  Contact JP Software.
  18851.  
  18852.  
  18853.           ___________________________________________________________________
  18854.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  323
  18855.  
  18856.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18857.           ___________________________________________________________________
  18858.  
  18859.  
  18860.                    DI    Same as Disk swap file corrupted.
  18861.                    DR    Same as Swap file read error.
  18862.                    DS    Same as Swap file seek error.
  18863.                    EI    Same as EMS mapping error.
  18864.                    NS    No number for new shell.  You have started too many
  18865.                          4DOS secondary shells without properly exiting some
  18866.                          of them, perhaps by closing DESQview windows rather
  18867.                          than EXITing.  Clean up any work in process and
  18868.                          reboot the system.
  18869.                    PT    Illegal process termination.  Contact JP Software.
  18870.                    TS    Terminated inactive shell.  Contact JP Software.
  18871.                    XI    Same as XMS move failed.
  18872.  
  18873.               Access denied:  You tried to write to or erase a read-only
  18874.               protected file, to rename a file or directory to an existing
  18875.               name, to create a directory that already exists, or to remove
  18876.               a read-only directory or a directory with files or
  18877.               subdirectories still in it.
  18878.  
  18879.               Alias loop:  An alias refers back to itself either directly or
  18880.               indirectly (i.e., a = b = a), or aliases are nested more than
  18881.               16 deep.  Correct your alias list.
  18882.  
  18883.               Ambiguous directive name:  The name of a 4DOS.INI directive
  18884.               was not fully spelled out and was therefore ambiguous.  Spell
  18885.               out the directive more fully to make its name unambiguous.
  18886.  
  18887.               Attempt to exit from root shell:  Another program has
  18888.               destroyed a portion of 4DOS's memory.  Reboot the system; if
  18889.               the error persists, contact JP Software.
  18890.  
  18891.               Bad disk unit:  Generally caused by a disk drive hardware
  18892.               failure.
  18893.  
  18894.               Bad environment:  The DOS environment has a bad structure,
  18895.               probably because a program destroyed 4DOS's master environment
  18896.               space.  Reboot the system.
  18897.  
  18898.               Batch file missing:  4DOS can't find the batch (.BAT) file it
  18899.               was running.  It was either deleted, renamed, moved, or the
  18900.               disk was changed.  Correct the problem and rerun the file.
  18901.  
  18902.               Can't copy file to itself:  4DOS will not permit you to COPY
  18903.               or MOVE a file to itself.  4DOS performs full path and
  18904.               filename expansion before copying to ensure that files aren't
  18905.               inadvertently destroyed.
  18906.  
  18907.  
  18908.  
  18909.  
  18910.           ___________________________________________________________________
  18911.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  324
  18912.  
  18913.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18914.           ___________________________________________________________________
  18915.  
  18916.  
  18917.  
  18918.               Can't create:  4DOS can't create the specified file.  The disk
  18919.               may be full or write protected, or the file already exists and
  18920.               is read-only, or the root directory is full.
  18921.  
  18922.               Can't delete:  4DOS can't delete the specified file or
  18923.               directory.  The disk is probably write protected.
  18924.  
  18925.               Can't get directory:  4DOS can't read the directory.  The disk
  18926.               drive is probably not ready.
  18927.  
  18928.               Can't make directory entry:  4DOS can't create the filename in
  18929.               the directory.  This is usually caused by a full root
  18930.               directory.  Create a subdirectory and move some of the files
  18931.               to it.
  18932.  
  18933.               Can't open:  4DOS can't open the specified file.  Either the
  18934.               file doesn't exist or the disk directory or File Allocation
  18935.               Table is damaged.
  18936.  
  18937.               Can't remove current directory:  You attempted to remove the
  18938.               current directory, which DOS does not allow.  Change to the
  18939.               parent directory and try again.
  18940.  
  18941.               Can't set up disk swap file:  The disk swap file you specified
  18942.               cannot be opened.  The path or drive is invalid, the disk is
  18943.               full, DOS is out of file handles, or there is a hardware
  18944.               problem.  Check 4DOS.INI to be sure your Swapping directive is
  18945.               correct.
  18946.  
  18947.               Command line too long:  A single command exceeded 255
  18948.               characters, or the entire command line exceeded 511
  18949.               characters, during alias and variable expansion.  To address
  18950.               this reduce the complexity of the command, or use a batch
  18951.               file.  This error also occurs if you pass an extremely long
  18952.               command line to 4DOS on your SHELL= line in CONFIG.SYS and
  18953.               4DOS does not have room for your command line and the
  18954.               necessary directory information for the COMSPEC environment
  18955.               variable.  In this case, place the commands in a batch file
  18956.               and invoke the batch file from your SHELL= line.
  18957.  
  18958.               Command tail too long:  A program attempted to pass a command
  18959.               in an improper format or a command longer than 126 characters
  18960.               to 4DOS.  This is probably a bug in the program from which
  18961.               4DOS was loaded.  Contact the author of the program or JP
  18962.               Software for technical assistance.
  18963.  
  18964.  
  18965.  
  18966.  
  18967.           ___________________________________________________________________
  18968.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  325
  18969.  
  18970.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18971.           ___________________________________________________________________
  18972.  
  18973.  
  18974.  
  18975.               Contents lost before copy:  COPY was appending files, and
  18976.               found one of the source files is the same as the target.  That
  18977.               source file is skipped, and appending continues with the next
  18978.               file.
  18979.  
  18980.               Data error:  DOS can't read or write properly to the device.
  18981.               On a floppy drive, this error is usually caused by a defective
  18982.               floppy disk, dirty disk drive heads, or a misalignment between
  18983.               the heads on your drive and the drive on which the disk was
  18984.               created.  On a hard drive, this error may indicate a drive
  18985.               that is too hot or too cold, or a hardware problem.  Retry the
  18986.               operation; if it fails again, correct the hardware or diskette
  18987.               problem.
  18988.  
  18989.               Directory stack empty:  POPD or DIRS can't find any entries in
  18990.               the directory stack.
  18991.  
  18992.               Disk is write protected:  The disk cannot be written to.
  18993.               Check the disk and remove the write-protect tab or close the
  18994.               write-protect window if necessary.
  18995.  
  18996.               Disk swap file corrupted:  The 4DOS disk swapping file
  18997.               (4DOSSWAP.nnn) has been moved, deleted, or damaged by another
  18998.               program.  Reboot the system.
  18999.  
  19000.               Drive not ready--close door:  The floppy disk drive door is
  19001.               open.  Close the door and try again.
  19002.  
  19003.               EMS deallocation failed:  4DOS can't deallocate EMS memory
  19004.               when exiting from a secondary shell.  The EMS map has been
  19005.               corrupted or the memory area used by 4DOS or the EMS driver
  19006.               has been destroyed by a program.  Clean up any work in process
  19007.               and reboot the system.
  19008.  
  19009.               EMS map save or restore failed:  4DOS cannot save or restore
  19010.               the EMS page map.  The EMS map has been corrupted, memory has
  19011.               been destroyed by a program, or you have an incompatible EMS
  19012.               driver.  If this error recurs, try another swapping method,
  19013.               update your EMS driver, or contact JP Software.
  19014.  
  19015.               EMS mapping failed:  4DOS can't map EMS pages when swapping to
  19016.               or from EMS.  The EMS map has been corrupted or the memory
  19017.               area used by the loader or the EMS driver has been destroyed
  19018.               by a program.  Reboot the system.
  19019.  
  19020.  
  19021.  
  19022.  
  19023.  
  19024.           ___________________________________________________________________
  19025.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  326
  19026.  
  19027.                                              APPENDIX A / 4DOS ERROR MESSAGES
  19028.           ___________________________________________________________________
  19029.  
  19030.  
  19031.  
  19032.               Environment already saved:  You have already saved the
  19033.               environment with a previous SETLOCAL command.  You cannot nest
  19034.               SETLOCAL / ENDLOCAL pairs.
  19035.  
  19036.               Error in command line directive:  You used the //iniline
  19037.               option to place a 4DOS.INI directive on the SHELL= line in
  19038.               CONFIG.SYS or on the startup command line for a secondary
  19039.               shell, but the directive is in error.  A more specific error
  19040.               message follows.
  19041.  
  19042.               Error on line [nnnn] of [filename]:  There is an error in your
  19043.               4DOS.INI file.  The following message explains the error in
  19044.               more detail.  Correct the line in error, and restart 4DOS for
  19045.               your change to take effect.
  19046.  
  19047.               Error reading:  DOS experienced an I/O error when reading from
  19048.               a device.  This is usually caused by a bad disk, a device not
  19049.               ready, or a hardware error.
  19050.  
  19051.               Error writing:  DOS experienced an I/O error when writing to a
  19052.               device.  This is usually caused by a full disk, a bad disk, a
  19053.               device not ready, or a hardware error.
  19054.  
  19055.               Exceeded batch nesting limit:  You have attempted to nest
  19056.               batch files more than 10 levels deep.
  19057.  
  19058.               Fatal error -- please reboot:  4DOS cannot continue due to the
  19059.               previous error.  Reboot the system.
  19060.  
  19061.               File Allocation Table bad:  DOS can't access the FAT on the
  19062.               specified disk.  This can be caused by a bad disk, a hardware
  19063.               error, or an unusual software interaction.
  19064.  
  19065.               File exists:  The requested output file already exists, and
  19066.               4DOS won't overwrite it.
  19067.  
  19068.               File not found:  4DOS couldn't find the specified file.  Check
  19069.               the spelling or path name.
  19070.  
  19071.               General failure:  This is usually a hardware problem,
  19072.               particularly a disk drive failure or a device not properly
  19073.               connected to a serial or parallel port.  Try to correct the
  19074.               problem or reboot and try again.
  19075.  
  19076.               I/O error in [filename] ... some directives may not have been
  19077.               processed:  An I/O error occurred while reading your 4DOS.INI
  19078.               file.  There may be a physical problem with data on the disk,
  19079.  
  19080.  
  19081.           ___________________________________________________________________
  19082.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  327
  19083.  
  19084.                                              APPENDIX A / 4DOS ERROR MESSAGES
  19085.           ___________________________________________________________________
  19086.  
  19087.  
  19088.               or a sharing error on a multitasking system.  Check your
  19089.               4DOS.INI file and try again.
  19090.  
  19091.               Illegal Swapping option or path:  The swap type or disk swap
  19092.               path in the 4DOS.INI Swapping directive is invalid.  4DOS
  19093.               ignores the bad swap type or path and attempts to scan the
  19094.               rest of the Swapping specification for a valid option.
  19095.               Multiple errors in the Swapping directive will cause this
  19096.               message to repeat.  Correct 4DOS.INI and reboot the system for
  19097.               the corrected swap type to take effect.
  19098.  
  19099.               INI file processing error at line n, remainder of file
  19100.               skipped:  An input error (such as a data error) has prevented
  19101.               4DOS from fully processing your 4DOS.INI file.  Check that the
  19102.               file is readable by another program, or TYPE it to ensure that
  19103.               4DOS reads the file properly.
  19104.  
  19105.               Insufficient disk space:  COPY or MOVE ran out of room on the
  19106.               destination drive.  Remove some files and retry the operation.
  19107.  
  19108.               Insufficient load space:  There is not enough room in 4DOS's
  19109.               internal memory areas to include all of the options you
  19110.               requested in 4DOS.INI.  Contact JP Software for assistance.
  19111.  
  19112.               Internal DOS error:  DOS encountered an internal bug and
  19113.               failed. Reboot the system.
  19114.  
  19115.               Invalid choice value:  You gave an invalid value for a
  19116.               "choice" directive (one that accepts a choice from a list,
  19117.               like "Yes" or "No") in 4DOS.INI.
  19118.  
  19119.               Invalid color:  You gave an invalid value for a color
  19120.               directive in 4DOS.INI.
  19121.  
  19122.               Invalid date:  An invalid date was entered.  Check the syntax
  19123.               and reenter.
  19124.  
  19125.               Invalid drive:  A bad or non-existent disk drive was
  19126.               specified.
  19127.  
  19128.               Invalid DOS version:  You need a newer version of DOS to
  19129.               execute the specified command.
  19130.  
  19131.               Invalid directive name:  4DOS can't recognize the name of a
  19132.               directive in your 4DOS.INI file.
  19133.  
  19134.               Invalid key name:  You tried to make an invalid key
  19135.               substitution in 4DOS.INI, or you used an invalid key name in a
  19136.  
  19137.  
  19138.           ___________________________________________________________________
  19139.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  328
  19140.  
  19141.                                              APPENDIX A / 4DOS ERROR MESSAGES
  19142.           ___________________________________________________________________
  19143.  
  19144.  
  19145.               keystroke alias or KEYSTACK.  Correct the error and retry the
  19146.               operation.
  19147.  
  19148.               Invalid numeric value:  You gave an invalid value for a
  19149.               numeric directive in 4DOS.INI.
  19150.  
  19151.               Invalid parameter:  4DOS didn't recognize a parameter.  Check
  19152.               the syntax and spelling.
  19153.  
  19154.               Invalid path:  The specified path does not exist.  Check the
  19155.               disk specification and/or spelling.
  19156.  
  19157.               Invalid path specification:  You used an invalid path in a
  19158.               path or filename directive in 4DOS.INI.
  19159.  
  19160.               Invalid section name:  You used an invalid section name in
  19161.               4DOS.INI.  The only valid section names are [Primary] and
  19162.               [Secondary].
  19163.  
  19164.               Invalid startup switch, ignored:  You passed 4DOS an invalid
  19165.               option on the SHELL= line in CONFIG.SYS or on the startup
  19166.               command line for a secondary shell.  Correct the switch.
  19167.  
  19168.               Invalid time:  An invalid time was entered.  Check the syntax
  19169.               and reenter.
  19170.  
  19171.               Keystroke substitution table full:  4DOS ran out of room to
  19172.               store keystroke substitutions entered in 4DOS.INI.  Reduce the
  19173.               number of key substitutions or contact JP Software for
  19174.               assistance.
  19175.  
  19176.               KSTACK.COM not loaded:  You attempted to execute a KEYSTACK
  19177.               command without loading KSTACK.COM.  See the KEYSTACK command
  19178.               for more information.
  19179.  
  19180.               Label not found:  A GOTO or GOSUB referred to a non-existent
  19181.               label. Check your batch file.
  19182.  
  19183.               Memory allocation error:  4DOS can't allocate memory while
  19184.               loading or while reserving memory for internal use.  DOS
  19185.               memory allocation has been corrupted.  Reboot the system.
  19186.  
  19187.               Memory deallocation error:  Similar to memory allocation
  19188.               error; memory has been corrupted.  Reboot the system.
  19189.  
  19190.               Memory destroyed:  The DOS memory control blocks have been
  19191.               corrupted.  Reboot the system.
  19192.  
  19193.  
  19194.  
  19195.           ___________________________________________________________________
  19196.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  329
  19197.  
  19198.                                              APPENDIX A / 4DOS ERROR MESSAGES
  19199.           ___________________________________________________________________
  19200.  
  19201.  
  19202.  
  19203.               Missing ENDTEXT:  A TEXT command is missing a matching
  19204.               ENDTEXT.  Check the batch file.
  19205.  
  19206.               Missing GOSUB:  4DOS cannot perform the RETURN command in a
  19207.               batch file.  You tried to do a RETURN without a GOSUB, or your
  19208.               batch file has been corrupted.
  19209.  
  19210.               Missing SETLOCAL:  4DOS encountered an ENDLOCAL without a
  19211.               matching SETLOCAL.
  19212.  
  19213.               No aliases defined:  You tried to display aliases but no
  19214.               aliases have been defined.
  19215.  
  19216.               No closing quote:  4DOS couldn't find a second matching quote
  19217.               (` or ") on the command line.
  19218.  
  19219.               No expression:  The expression passed to the %@EVAL variable
  19220.               function is empty.  Correct the expression and retry the
  19221.               operation.
  19222.  
  19223.               No file handle available:  This is an internal 4DOS disk
  19224.               swapping error.  Change to another swapping method if
  19225.               possible, and contact JP Software.
  19226.  
  19227.               No room for INI file name.   4DOS does not have enough space
  19228.               in the INI file string area to pass the name of your 4DOS.INI
  19229.               file to secondary shells.  4DOS will load and run properly,
  19230.               but any [Secondary] section in 4DOS.INI will be ignored in
  19231.               secondary shells.  Reduce the complexity of 4DOS.INI or
  19232.               contact JP Software for assistance.
  19233.  
  19234.               No UMBs; loading low:  The LOADHIGH (or LH) command can't find
  19235.               any UMBs for your program.  The program is loaded into base
  19236.               memory.  LH and LOADHIGH only work with MS-DOS 5.0 and above,
  19237.               when the DOS=UMB directive is included in CONFIG.SYS and
  19238.               sufficient upper memory space is available for the program.
  19239.  
  19240.               No upper memory available, master environment will be placed
  19241.               in low memory:  You asked 4DOS to load the master environment
  19242.               into an UMB via the UMBEnvironment directive in 4DOS.INI, but
  19243.               no UMB was available.  Check that your XMS driver is properly
  19244.               installed and / or free up some UMB space in use by another
  19245.               program.
  19246.  
  19247.               No upper memory available, resident portion will remain in low
  19248.               memory:  You requested relocation of the 4DOS resident portion
  19249.               to an UMB via the UMBLoad directive in 4DOS.INI, but no UMB
  19250.  
  19251.  
  19252.           ___________________________________________________________________
  19253.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  330
  19254.  
  19255.                                              APPENDIX A / 4DOS ERROR MESSAGES
  19256.           ___________________________________________________________________
  19257.  
  19258.  
  19259.               was available.  Check that your XMS driver is properly
  19260.               installed and / or free up some UMB space in use by another
  19261.               program.
  19262.  
  19263.               Non-DOS disk:  DOS can't read the disk.  Either the disk is
  19264.               bad, or it has been formatted by a different operating system.
  19265.               Reformat it as a DOS disk.
  19266.  
  19267.               Not an alias:  The specified alias is not in the 4DOS alias
  19268.               list.
  19269.  
  19270.               Not in environment:  The specified variable is not in the
  19271.               environment.
  19272.  
  19273.               Not in swapping mode:  You attempted to turn swapping on or
  19274.               off with the SWAPPING command, but 4DOS is loaded in memory-
  19275.               resident mode and swapping is not active.
  19276.  
  19277.               Not ready:  The specified device can't be accessed.
  19278.  
  19279.               Not same device:  This error usually appears in RENAME.  You
  19280.               cannot rename a file to a different disk drive.
  19281.  
  19282.               Out of environment / alias space:  4DOS has run out of space
  19283.               for environment variables or aliases.  Edit the SHELL line in
  19284.               CONFIG.SYS or the Environment directive in 4DOS.INI to
  19285.               increase the environment size, or the Alias directive in
  19286.               4DOS.INI to increase the alias list size.
  19287.  
  19288.               Out of memory:  DOS or 4DOS had insufficient free memory to
  19289.               execute the last command, or the DOS memory control blocks
  19290.               have been destroyed.  If this error occurs in a secondary
  19291.               shell, return to the primary shell before running the command.
  19292.               Otherwise, try to free some memory by removing memory-resident
  19293.               programs.  If the error persists, use the MEMORY command to
  19294.               determine the actual memory available.  If the base memory
  19295.               (DOS RAM) figures reported by MEMORY are unreasonable, the
  19296.               memory control blocks have probably been destroyed and you
  19297.               must reboot the system.  If you receive this error from DIR
  19298.               when the MEMORY command shows sufficient memory for the
  19299.               directory you are displaying, memory has probably been
  19300.               "fragmented", and contains a free area larger than 8K but not
  19301.               large enough for the entire directory.  Use a memory mapping
  19302.               program like PMAP, MAPMEM, or MANIFEST to determine where the
  19303.               fragmentation is, and experiment with your TSRs and
  19304.               applications to determine and remove its cause.
  19305.  
  19306.  
  19307.  
  19308.  
  19309.           ___________________________________________________________________
  19310.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  331
  19311.  
  19312.                                              APPENDIX A / 4DOS ERROR MESSAGES
  19313.           ___________________________________________________________________
  19314.  
  19315.  
  19316.  
  19317.               Out of paper:  DOS detected an out-of-paper condition on one
  19318.               of the parallel printers (LPT1, LPT2, or LPT3).  Check your
  19319.               printer and add paper if necessary.
  19320.  
  19321.               Overflow:  An arithmetic overflow occurred in the %@EVAL
  19322.               variable function.  Check the values being passed to %@EVAL.
  19323.               %@EVAL can handle 16 digits to the left of the decimal point
  19324.               and 8 to the right.
  19325.  
  19326.               Read error:  DOS disk read error; usually caused by a bad disk
  19327.               or a non-DOS disk.
  19328.  
  19329.               Sector not found:  BIOS disk error; usually caused by a bad
  19330.               disk or a non-DOS disk.
  19331.  
  19332.               Seek error:  DOS can't seek to the proper location on the
  19333.               disk.  This is generally caused by a bad disk or drive.
  19334.  
  19335.               String area overflow:  4DOS ran out of room to store the text
  19336.               from string directives in 4DOS.INI.  Reduce the complexity of
  19337.               4DOS.INI or contact JP Software for assistance.
  19338.  
  19339.               Swap file [seek | read | write] failed:  4DOS  encountered an
  19340.               I/O error while accessing the disk swap file (4DOSSWAP.nnn).
  19341.               The disk was changed, the file has been destroyed by a
  19342.               program, or 4DOS's memory area has been overwritten by a
  19343.               program.  Reboot the system.
  19344.  
  19345.               Syntax error:  A command or variable function was entered in
  19346.               an improper format.  Check the syntax in this manual and
  19347.               correct the error.
  19348.  
  19349.               Too many DR-DOS SETs in CONFIG.SYS:  The SET commands in your
  19350.               DR-DOS CONFIG.SYS file exceeded the size of 4DOS's buffer
  19351.               area.  Reduce the number or length of the commands or contact
  19352.               JP Software for assistance.
  19353.  
  19354.               Too many open files:  DOS has run out of file handles.  Try
  19355.               setting FILES=20 or more in your CONFIG.SYS file.
  19356.  
  19357.               Transient memory allocation error:  4DOS couldn't reserve
  19358.               memory for its transient portion (probably in a SWAPPING OFF
  19359.               command).  The memory control blocks have been destroyed, or a
  19360.               program has fragmented memory.  Reboot the system.
  19361.  
  19362.               Transient memory deallocation error:  4DOS couldn't release
  19363.               memory for its transient portion (probably in a SWAPPING ON
  19364.  
  19365.  
  19366.           ___________________________________________________________________
  19367.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  332
  19368.  
  19369.                                              APPENDIX A / 4DOS ERROR MESSAGES
  19370.           ___________________________________________________________________
  19371.  
  19372.  
  19373.               command).  The memory control blocks have been destroyed, or a
  19374.               program has fragmented memory.  Reboot the system.
  19375.  
  19376.               Unbalanced parentheses:  The number of left and right
  19377.               parentheses did not match in an expression passed to the
  19378.               %@EVAL variable function.  Correct the expression and retry
  19379.               the operation.
  19380.  
  19381.               Unknown command:  A command was entered that 4DOS didn't
  19382.               recognize and couldn't find in the current search path.  Check
  19383.               the spelling or PATH specification.
  19384.  
  19385.               Variable loop:  A nested environment variable refers to
  19386.               itself, or variables are nested more than 16 deep.  Correct
  19387.               the error and retry the command.
  19388.  
  19389.               Write error:  A DOS disk error, usually caused by a bad disk
  19390.               or a non-DOS disk.
  19391.  
  19392.               XMS deallocation failed:  4DOS could not deallocate XMS memory
  19393.               when exiting a secondary shell.  XMS memory has been
  19394.               destroyed; reboot your system.
  19395.  
  19396.               XMS move failed:  4DOS could not move data between base memory
  19397.               and XMS memory while swapping itself.  XMS memory has been
  19398.               destroyed; reboot your system.
  19399.  
  19400.  
  19401.  
  19402.  
  19403.  
  19404.  
  19405.  
  19406.  
  19407.  
  19408.  
  19409.  
  19410.  
  19411.  
  19412.  
  19413.  
  19414.  
  19415.  
  19416.  
  19417.  
  19418.  
  19419.  
  19420.  
  19421.  
  19422.  
  19423.           ___________________________________________________________________
  19424.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  333
  19425.  
  19426.                                              APPENDIX B / ASCII AND KEY CODES
  19427.           ___________________________________________________________________
  19428.  
  19429.  
  19430.  
  19431.           APPENDIX B / ASCII AND KEY CODES
  19432.  
  19433.  
  19434.           ASCII
  19435.  
  19436.               To represent the text you type, computers must translate each
  19437.               letter to and from a number.  The code used by all PC-
  19438.               compatible computers for this translation is called ASCII
  19439.               (American Standard Code for Information Interchange).  ASCII
  19440.               codes are also used for the characters displayed on the
  19441.               screen.  Function keys, cursor keys, and Alt keys do not
  19442.               generate ASCII codes.  For details on these keys and a
  19443.               reference table, see Keys and Key Codes later in this
  19444.               Appendix.
  19445.  
  19446.               The ASCII table on the following pages is in three parts.  The
  19447.               first two parts cover the 128 standard ASCII characters; the
  19448.               third part covers the additional 128 extended ASCII characters
  19449.               defined by IBM for use on the IBM PC and compatible computers.
  19450.               All the tables include a Char column showing the visual
  19451.               representation of the character, a Dec column showing the
  19452.               decimal numeric value of the character in the ASCII set, and a
  19453.               Hex column showing the hexadecimal (base-16) value.  The
  19454.               tables are divided as follows:
  19455.  
  19456.               ASCII Control Characters have numeric values between 0 and 31,
  19457.               and include non-printing characters like carriage return and
  19458.               line feed.  The ASCII standard does not define a visual
  19459.               representation for control characters, but the IBM PC
  19460.               character set does define one for most control characters as
  19461.               shown in the Char column of the table.  You can enter these
  19462.               characters using the Ctrl key combination shown in the Ctrl
  19463.               column of this table, with a caret [^] representing the Ctrl
  19464.               key.  For example, character 4 is shown as ^D;  to enter it,
  19465.               press Ctrl and D on your keyboard.  You can also enter control
  19466.               characters with the Alt key and the numeric keypad, like
  19467.               extended ASCII codes (see below).  The Name column of this
  19468.               table shows a two or three character "name" given to each
  19469.               control character as part of the ASCII standard.
  19470.  
  19471.               ASCII Printing Characters have numeric values between 32 and
  19472.               127, and include the entire English-language character set as
  19473.               well as punctuation and other special marks.  You enter these
  19474.               characters by pressing the corresponding keyboard key.
  19475.               Character 127 has no corresponding keyboard key, but can be
  19476.               entered on many systems by typing Ctrl-Backspace.
  19477.  
  19478.  
  19479.  
  19480.           ___________________________________________________________________
  19481.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  334
  19482.  
  19483.                                              APPENDIX B / ASCII AND KEY CODES
  19484.           ___________________________________________________________________
  19485.  
  19486.  
  19487.  
  19488.               Extended ASCII Characters have values between 128 and 255 and
  19489.               include international language characters, line-drawing
  19490.               characters, and other graphics symbols.  You can enter
  19491.               extended ASCII codes on the keyboard by holding down the Alt
  19492.               key, entering the decimal numeric value of the key on the
  19493.               numeric keypad, and then releasing the Alt key.
  19494.  
  19495.  
  19496.  
  19497.  
  19498.  
  19499.  
  19500.  
  19501.  
  19502.  
  19503.  
  19504.  
  19505.  
  19506.  
  19507.  
  19508.  
  19509.  
  19510.  
  19511.  
  19512.  
  19513.  
  19514.  
  19515.  
  19516.  
  19517.  
  19518.  
  19519.  
  19520.  
  19521.  
  19522.  
  19523.  
  19524.  
  19525.  
  19526.  
  19527.  
  19528.  
  19529.  
  19530.  
  19531.  
  19532.  
  19533.  
  19534.  
  19535.  
  19536.  
  19537.           ___________________________________________________________________
  19538.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  335
  19539.  
  19540.                                              APPENDIX B / ASCII AND KEY CODES
  19541.           ___________________________________________________________________
  19542.  
  19543.  
  19544.  
  19545.  
  19546.  
  19547.               This page has been left blank because a complete table of
  19548.               ASCII codes does not print properly on many printers.  The
  19549.               complete ASCII table is in the file ASCTAB.TXT.  If your
  19550.               printer can handle the characters in ASCTAB.TXT you can
  19551.               print it the same way you did with this file, and paste the 
  19552.               text into these pages.  There is also a complete ASCII table
  19553.               in the -ASCII- topic in the 4DOS on-line help.
  19554.  
  19555.  
  19556.  
  19557.  
  19558.  
  19559.  
  19560.  
  19561.  
  19562.  
  19563.  
  19564.  
  19565.  
  19566.  
  19567.  
  19568.  
  19569.  
  19570.  
  19571.  
  19572.  
  19573.  
  19574.  
  19575.  
  19576.  
  19577.  
  19578.  
  19579.  
  19580.  
  19581.  
  19582.  
  19583.  
  19584.  
  19585.  
  19586.  
  19587.  
  19588.  
  19589.  
  19590.  
  19591.  
  19592.  
  19593.  
  19594.           ___________________________________________________________________
  19595.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  336
  19596.  
  19597.                                              APPENDIX B / ASCII AND KEY CODES
  19598.           ___________________________________________________________________
  19599.  
  19600.  
  19601.  
  19602.  
  19603.  
  19604.               This page has been left blank because a complete table of
  19605.               ASCII codes does not print properly on many printers.  The
  19606.               complete ASCII table is in the file ASCTAB.TXT.  If your
  19607.               printer can handle the characters in ASCTAB.TXT you can
  19608.               print it the same way you did with this file, and paste the 
  19609.               text into these pages.  There is also a complete ASCII table
  19610.               in the -ASCII- topic in the 4DOS on-line help.
  19611.  
  19612.  
  19613.  
  19614.  
  19615.  
  19616.  
  19617.  
  19618.  
  19619.  
  19620.  
  19621.  
  19622.  
  19623.  
  19624.  
  19625.  
  19626.  
  19627.  
  19628.  
  19629.  
  19630.  
  19631.  
  19632.  
  19633.  
  19634.  
  19635.  
  19636.  
  19637.  
  19638.  
  19639.  
  19640.  
  19641.  
  19642.  
  19643.  
  19644.  
  19645.  
  19646.  
  19647.  
  19648.  
  19649.  
  19650.  
  19651.           ___________________________________________________________________
  19652.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  337
  19653.  
  19654.                                              APPENDIX B / ASCII AND KEY CODES
  19655.           ___________________________________________________________________
  19656.  
  19657.  
  19658.  
  19659.           Keys and Key Codes
  19660.  
  19661.               When you press a single key or a key combination, software
  19662.               built into your computer (the BIOS or Basic Input / Output
  19663.               System) translates your keystroke into two numbers:  a scan
  19664.               code, representing the actual key that was pressed, and an
  19665.               ASCII code, representing the ASCII value for that key.  The
  19666.               BIOS returns these numbers the next time a program requests
  19667.               keyboard input.  This section explains how key codes work;
  19668.               for information on using them with 4DOS features see 4DOS.INI
  19669.               (page 133), keystroke aliases (page 177), INKEY (page 253),
  19670.               and KEYSTACK (page 257).
  19671.  
  19672.               As PCs have evolved, the structure of keyboard codes has
  19673.               evolved somewhat haphazardly with them, resulting in a
  19674.               bewildering array of possible key codes.  We'll give you a
  19675.               basic explanation of how key codes work.  For a more in-depth
  19676.               discussion, refer to a BIOS or PC hardware reference manual.
  19677.  
  19678.               The nuances of how your keyboard behaves depends on the
  19679.               keyboard manufacturer and the computer manufacturer who
  19680.               provides the built-in BIOS.  As a result, we can't guarantee
  19681.               the accuracy of the information below for every system, but
  19682.               the discussion and reference table should be accurate for most
  19683.               systems.  Our discussion is based on the 101-key "enhanced"
  19684.               keyboard commonly used on AT-compatible and PS/2 computers,
  19685.               but virtually all of it is applicable to the 84-key keyboards
  19686.               on older PC and XT systems.  The primary difference is that
  19687.               the older keyboards lack a separate cursor pad and only have
  19688.               10 function keys.
  19689.  
  19690.               All keys have a scan code.  Not all keys have an ASCII code.
  19691.               For example, function keys and cursor keys are not part of the
  19692.               ASCII character set (see above), and have no ASCII value, but
  19693.               they do have a scan code.  Some keys have more than one ASCII
  19694.               code.  The A key, for example, has ASCII code 97 (lower case
  19695.               "a") if you press it by itself.  If you press it along with
  19696.               the Shift key, the ASCII code changes to 65 (upper case "A").
  19697.               If you press Ctrl and A the ASCII code changes to 1.  In all
  19698.               these cases, the scan code (30) is unchanged because you are
  19699.               pressing the same physical key.
  19700.  
  19701.               Things are different if you press Alt-A.  Alt keystrokes have
  19702.               no ASCII code, so the BIOS returns an ASCII code of 0, along
  19703.               with the A key's scan code of 30.  This allows a program to
  19704.               detect all the possible variations of A, based on the
  19705.               combination of ASCII code and scan code.
  19706.  
  19707.  
  19708.           ___________________________________________________________________
  19709.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  338
  19710.  
  19711.                                              APPENDIX B / ASCII AND KEY CODES
  19712.           ___________________________________________________________________
  19713.  
  19714.  
  19715.  
  19716.               Some keys generate more than one scan code depending on
  19717.               whether Shift, Ctrl, or Alt is pressed.  This allows a program
  19718.               to differentiate between two different keystrokes on the same
  19719.               key, neither of which has a corresponding ASCII value.  For
  19720.               example, F1 has no ASCII value so it returns an ASCII code of
  19721.               0, and the F1 scan code of 59.  Shift-F1 also returns an ASCII
  19722.               code 0;  if it also returned a scan code of 59, a program
  19723.               couldn't distinguish it from F1.  The BIOS translates scan
  19724.               codes for keys like Shift-F1 (and Ctrl-F1 and Alt-F1) so that
  19725.               each variation returns a different scan code along with an
  19726.               ASCII code of 0.
  19727.  
  19728.               On the 101-key keyboard that we're discussing, there's one
  19729.               more variation: non-ASCII keys on the cursor keypad (such as
  19730.               up-arrow) return the same scan code as the corresponding key
  19731.               on the numeric keypad, for compatibility reasons.  If they
  19732.               also returned an ASCII code of 0, a program couldn't tell
  19733.               which key was pressed.  Therefore, these keys return an ASCII
  19734.               code of 224 rather than 0.  This means that older programs,
  19735.               which only look for an ASCII 0 to indicate a non-ASCII
  19736.               keystroke like up-arrow, may not detect these cursor pad keys
  19737.               properly.
  19738.  
  19739.               The number of different codes returned by any given key varies
  19740.               from one (the spacebar) to four, depending on the particular
  19741.               key, the design of your keyboard, and the BIOS in your system.
  19742.               Some keys, like the Alt, Ctrl, and Shift by themselves or in
  19743.               combination with each other, plus the Print Screen, SysReq,
  19744.               Scroll Lock, Pause, Break, Num Lock, and Caps Lock keys, do
  19745.               not have any code representations at all.  The same is true of
  19746.               keystrokes with more than one modifying key, like Ctrl-Shift-
  19747.               A.  The BIOS may perform special actions automatically when
  19748.               you press these keys (for example, it switches into Caps Lock
  19749.               mode when you press Caps Lock), but it does not report the
  19750.               keystrokes to whatever program is running.  Programs which
  19751.               detect such keystrokes access the keyboard hardware directly,
  19752.               a subject which is beyond the scope of this manual.
  19753.  
  19754.               The following table lists all of the keys on the 101-key
  19755.               "enhanced" keyboard.  The keys are arranged roughly in scan
  19756.               code order, which is generally left to right, moving from the
  19757.               top of the keyboard to the bottom.
  19758.  
  19759.               Column 1 shows the key's keycap symbol or name.  Columns 2 and
  19760.               3 show the scan and ASCII code if the key is unshifted.
  19761.               Columns 4 & 5 contain the codes for the shifted key.  Columns
  19762.               6 & 7 show the code for Ctrl plus the key.  The last column
  19763.  
  19764.  
  19765.           ___________________________________________________________________
  19766.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  339
  19767.  
  19768.                                              APPENDIX B / ASCII AND KEY CODES
  19769.           ___________________________________________________________________
  19770.  
  19771.  
  19772.               contains the scan code for Alt plus the key (Alt keystrokes
  19773.               have no ASCII code and always generate an ASCII code of 0,
  19774.               which is not shown).
  19775.  
  19776.               Keys with ASCII values return the same scan code regardless of
  19777.               whether Shift, Ctrl, or Alt is pressed, so the scan code
  19778.               columns below may seem repetitive for these keys.  We've
  19779.               included them in the interest of completeness, since you may
  19780.               need to verify the exact code for a particular key
  19781.               combination.
  19782.  
  19783.               Key names prefaced by np are on the numeric keypad.  Those
  19784.               prefaced by cp are on the cursor keypad between the main
  19785.               typing keys and the number keypad.  The numeric keypad values
  19786.               are valid if Num Lock is turned off.  If you need to specify a
  19787.               number key from the numeric keypad, use the scan code shown
  19788.               for the keypad and the ASCII code shown for the corresponding
  19789.               typewriter key.  For example, the keypad "7" has a scan code
  19790.               of 71 (the np Home scan code) and an ASCII code of 54 (the
  19791.               ASCII code for "7").
  19792.  
  19793.               The chart is blank for key combinations that are not reported
  19794.               at all by the BIOS, like Ctrl-1 and Alt-PgUp.
  19795.  
  19796.  
  19797.  
  19798.  
  19799.  
  19800.  
  19801.  
  19802.  
  19803.  
  19804.  
  19805.  
  19806.  
  19807.  
  19808.  
  19809.  
  19810.  
  19811.  
  19812.  
  19813.  
  19814.  
  19815.  
  19816.  
  19817.  
  19818.  
  19819.  
  19820.  
  19821.  
  19822.           ___________________________________________________________________
  19823.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  340
  19824.  
  19825.                                              APPENDIX B / ASCII AND KEY CODES
  19826.           ___________________________________________________________________
  19827.  
  19828.  
  19829.  
  19830.  
  19831.                     Scan Codes and Key Codes for Top Two Keyboard Rows
  19832.  
  19833.                                          Shift  Shift  Ctrl   Ctrl   Alt
  19834.                 Key Cap    Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  19835.                 Symbol     Code   Code   Code   Code   Code   Code   Code
  19836.                 -------    -----  -----  -----  -----  -----  -----  -----
  19837.                 Esc        1      27     1      27     1      27     1
  19838.                 1  !       2      49     2      33                   120
  19839.                 2  @       3      50     3      64     3      0      121
  19840.                 3  #       4      51     4      35                   122
  19841.                 4  $       5      52     5      36                   123
  19842.                 5  %       6      53     6      37                   124
  19843.                 6  ^       7      54     7      94     7      30     125
  19844.                 7  &       8      55     8      38                   126
  19845.                 8  *       9      56     9      42                   127
  19846.                 9  (       10     57     10     40                   128
  19847.                 0  )       11     48     11     41                   129
  19848.                 -  _       12     45     12     95     12     31     130
  19849.                 =  +       13     61     13     43                   131
  19850.                 Backspace  14     8      14     8      14     127    14
  19851.                 Tab        15     9      15     0      148    0      165
  19852.                 Q          16     113    16     81     16     17     16
  19853.                 W          17     119    17     87     17     23     17
  19854.                 E          18     101    18     69     18     5      18
  19855.                 R          19     114    19     82     19     18     19
  19856.                 T          20     116    20     84     20     20     20
  19857.                 Y          21     121    21     89     21     25     21
  19858.                 U          22     117    22     85     22     21     22
  19859.                 I          23     105    23     73     23     9      23
  19860.                 O          24     111    24     79     24     15     24
  19861.                 P          25     112    25     80     25     16     25
  19862.                 [  {       26     91     26     123    26     27     26
  19863.                 ]  }       27     93     27     125    27     29     27
  19864.                 Enter      28     13     28     13     28     10     28
  19865.  
  19866.  
  19867.  
  19868.  
  19869.  
  19870.  
  19871.  
  19872.  
  19873.  
  19874.  
  19875.  
  19876.  
  19877.  
  19878.  
  19879.           ___________________________________________________________________
  19880.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  341
  19881.  
  19882.                                              APPENDIX B / ASCII AND KEY CODES
  19883.           ___________________________________________________________________
  19884.  
  19885.  
  19886.  
  19887.                    Scan Codes and Key Codes for Bottom Two Keyboard Rows
  19888.  
  19889.                                          Shift  Shift  Ctrl   Ctrl   Alt
  19890.                 Key Cap    Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  19891.                 Symbol     Code   Code   Code   Code   Code   Code   Code
  19892.                 -------    -----  -----  -----  -----  -----  -----  -----
  19893.                 A          30     97     30     65     30     1      30
  19894.                 S          31     115    31     83     31     19     31
  19895.                 D          32     100    32     68     32     4      32
  19896.                 F          33     102    33     70     33     6      33
  19897.                 G          34     103    34     71     34     7      34
  19898.                 H          35     104    35     72     35     8      35
  19899.                 J          36     106    36     74     36     10     36
  19900.                 K          37     107    37     75     37     11     37
  19901.                 L          38     108    38     76     38     12     38
  19902.                 ;  :       39     59     39     58                   39
  19903.                 '  "       40     39     40     34                   40
  19904.                 `  ~       41     96     41     126                  41
  19905.                 \  |       43     92     43     124    43     28     43
  19906.                 Z          44     122    44     90     44     26     44
  19907.                 X          45     120    45     88     45     24     45
  19908.                 C          46     99     46     67     46     3      46
  19909.                 V          47     118    47     86     47     22     47
  19910.                 B          48     98     48     66     48     2      48
  19911.                 N          49     110    49     78     49     14     49
  19912.                 M          50     109    50     77     50     13     50
  19913.                 ,  <       51     44     51     60                   51
  19914.                 .  >       52     46     52     62                   52
  19915.                 /  ?       53     47     53     63                   53
  19916.                 Space      57     32     57     32     57     32     57
  19917.  
  19918.  
  19919.  
  19920.  
  19921.  
  19922.  
  19923.  
  19924.  
  19925.  
  19926.  
  19927.  
  19928.  
  19929.  
  19930.  
  19931.  
  19932.  
  19933.  
  19934.  
  19935.  
  19936.           ___________________________________________________________________
  19937.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  342
  19938.  
  19939.                                              APPENDIX B / ASCII AND KEY CODES
  19940.           ___________________________________________________________________
  19941.  
  19942.  
  19943.                   Scan Codes and Key Codes for Key Pads and Function Keys
  19944.  
  19945.                                          Shift  Shift  Ctrl   Ctrl   Alt
  19946.                 Key Cap    Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  19947.                 Symbol     Code   Code   Code   Code   Code   Code   Code
  19948.                 -------    -----  -----  -----  -----  -----  -----  -----
  19949.                 F1         59     0      84     0      94     0      104
  19950.                 F2         60     0      85     0      95     0      105
  19951.                 F3         61     0      86     0      96     0      106
  19952.                 F4         62     0      87     0      97     0      107
  19953.                 F5         63     0      88     0      98     0      108
  19954.                 F6         64     0      89     0      99     0      109
  19955.                 F7         65     0      90     0      100    0      110
  19956.                 F8         66     0      91     0      101    0      111
  19957.                 F9         67     0      92     0      102    0      112
  19958.                 F10        68     0      93     0      103    0      113
  19959.                 F11        133    0      135    0      137    0      139
  19960.                 F12        134    0      136    0      138    0      140
  19961.                 np *       55     42     55     42     150    0      55
  19962.                 np Home    71     0      71     55     119    0
  19963.                 cp Home    71     224    71     224    119    224    151
  19964.                 np Up      72     0      72     56     141    0
  19965.                 cp Up      72     224    72     224    141    224    152
  19966.                 np PgUp    73     0      73     57     132    0
  19967.                 cp PgUp    73     224    73     224    132    224    153
  19968.                 np Minus   74     45     74     45     142    0      74
  19969.                 np Left    75     0      75     52     115    0
  19970.                 cp Left    75     224    75     224    115    224    155
  19971.                 np 5       76     0      76     53     143    0
  19972.                 np Right   77     0      77     54     116    0
  19973.                 cp Right   77     224    77     224    116    224    157
  19974.                 np Plus    78     43     78     43     144    0      78
  19975.                 np End     79     0      79     49     117    0
  19976.                 cp End     79     224    79     224    117    224    159
  19977.                 np Down    80     0      80     50     145    0
  19978.                 cp Down    80     224    80     224    145    224    160
  19979.                 np PgDn    81     0      81     51     118    0
  19980.                 cp PgDn    81     224    81     224    118    224    161
  19981.                 np Ins     82     0      82     48     146    0
  19982.                 cp Ins     82     224    82     224    146    224    162
  19983.                 np Del     83     0      83     46     147    0
  19984.                 cp Del     83     224    83     224    147    224    163
  19985.                 np /       224    47     224    47     149    0      164
  19986.                 np Enter   224    13     224    13     224    10     166
  19987.  
  19988.  
  19989.  
  19990.  
  19991.  
  19992.  
  19993.           ___________________________________________________________________
  19994.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  343
  19995.  
  19996.                                            APPENDIX C / TECHNICAL INFORMATION
  19997.           ___________________________________________________________________
  19998.  
  19999.  
  20000.  
  20001.           APPENDIX C / TECHNICAL INFORMATION
  20002.  
  20003.  
  20004.           This appendix provides technical information for programmers who
  20005.           wish to build interfaces to 4DOS.  It covers detecting 4DOS,
  20006.           placing keystrokes in the Keystack, writing installable commands,
  20007.           using the DESCRIPT.ION file, and using the interrupt 2E "back door"
  20008.           entry into 4DOS to execute commands.
  20009.  
  20010.  
  20011.           Detecting 4DOS
  20012.  
  20013.  
  20014.               Detecting 4DOS From a Batch File
  20015.  
  20016.               From a batch file, you can determine if 4DOS is loaded by
  20017.               testing for the variable function @EVAL, with a test like
  20018.               this:
  20019.  
  20020.                    if "%@eval[2+2]" == "4" echo 4DOS is loaded!
  20021.  
  20022.               This test can never succeed in COMMAND.COM and is therefore a
  20023.               reliable way to detect 4DOS.  Other variable functions could
  20024.               be used for the same purpose.
  20025.  
  20026.  
  20027.               Detecting 4DOS From a Program
  20028.  
  20029.               Any program can test for the presence of 4DOS by making a
  20030.               simple INT 2Fh call.  Be sure to check the INT 2Fh vector
  20031.               first as it may be 0 under some versions of DOS 2 if no
  20032.               program has hooked the interrupt.  To detect 4DOS, call INT
  20033.               2Fh with:
  20034.  
  20035.                     AX = D44Dh
  20036.                     BX = 0
  20037.  
  20038.               If 4DOS is not loaded, AX should be returned unchanged.  If
  20039.               4DOS is loaded, it will return the following (no other
  20040.               registers are modified):
  20041.  
  20042.                     AX = 44DDh
  20043.                     BX = Version number (BL = major version, BH = minor
  20044.                          version)
  20045.                     CX = 4DOS PSP segment address
  20046.                     DL = 4DOS shell number
  20047.  
  20048.  
  20049.  
  20050.           ___________________________________________________________________
  20051.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  344
  20052.  
  20053.                                            APPENDIX C / TECHNICAL INFORMATION
  20054.           ___________________________________________________________________
  20055.  
  20056.  
  20057.  
  20058.               The shell number is incremented each time a new copy of 4DOS
  20059.               is loaded, either in a different multitasker window (for
  20060.               example, under DESQview), or via nested shells.  The primary
  20061.               shell is shell number 0.
  20062.  
  20063.               This function tells you if 4DOS is loaded in memory, but not
  20064.               whether it is the parent process of your program.  You can
  20065.               determine if 4DOS is the parent process by comparing the PSP
  20066.               value returned in CX to the PSP chain pointer at offset 16h in
  20067.               your program's PSP.
  20068.  
  20069.  
  20070.               Detecting the 4DOS Prompt
  20071.  
  20072.               4DOS generates INT 2Fh calls before and after the prompt is
  20073.               displayed to allow TSRs to detect that 4DOS is at the prompt.
  20074.               The calls are:
  20075.  
  20076.                     AX = D44Eh
  20077.                     BX = 0:  4DOS is about to display the prompt
  20078.                          1:  4DOS is about to accept input at the prompt
  20079.                          2:  keyboard input is complete and 4DOS is about to
  20080.                          begin processing the line
  20081.  
  20082.               The BX = 0 call occurs immediately before displaying the
  20083.               prompt; the BX = 1 call occurs after displaying the prompt and
  20084.               immediately before accepting keyboard input; and the BX = 2
  20085.               call occurs immediately after 4DOS receives the CR (Enter)
  20086.               keystroke, but before the line is processed.  Any routine
  20087.               intercepting these calls should preserve the SI, DI, BP, SP,
  20088.               DS, ES, and SS registers.
  20089.  
  20090.  
  20091.           Placing Keystrokes Into the Keystack
  20092.  
  20093.               You can put keystrokes into the 4DOS Keystack with an INT 2Fh
  20094.               call.  First, you must make a call to check whether KSTACK.COM
  20095.               is loaded:
  20096.  
  20097.                    AX =  D44Fh
  20098.                    BX =  0
  20099.  
  20100.               If KSTACK.COM is not loaded, this call will return AX
  20101.               unchanged.  If it is loaded, AX will be returned as 44DDh;
  20102.               other registers will be unchanged.  Once you have determined
  20103.               that KSTACK.COM is loaded, you can send keystrokes with this
  20104.               call:
  20105.  
  20106.  
  20107.           ___________________________________________________________________
  20108.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  345
  20109.  
  20110.                                            APPENDIX C / TECHNICAL INFORMATION
  20111.           ___________________________________________________________________
  20112.  
  20113.  
  20114.  
  20115.                     AX = D44Fh
  20116.                     BX = 1
  20117.                     CX = number of keystrokes being passed
  20118.                     DS:DX = address of the keystroke array
  20119.  
  20120.               On return, if the call succeeded then AX will be 0; if it
  20121.               failed, AX will be non-zero.  BX, CX, and DX are destroyed;
  20122.               other registers are preserved.  If the call succeeds,
  20123.               subsequent calls to INT 16h functions 0, 1, 10h, or 11h will
  20124.               receive the stacked keystrokes.
  20125.  
  20126.               The keystroke array passed to KSTACK must be an array of words
  20127.               containing the values to return from INT 16h.  The high byte
  20128.               of each word is a scan code and the low byte is an ASCII code.
  20129.               Many programs accept keystrokes properly with only the ASCII
  20130.               code, but some require the scan code as well.  See page 338
  20131.               for a list of ASCII and scan codes for most keyboards.  To
  20132.               insert a delay in the keystroke sequence, include a word set
  20133.               to FFFFh followed by a word containing the desired delay in
  20134.               clock ticks.
  20135.  
  20136.  
  20137.           Writing Installable Commands
  20138.  
  20139.               An "installable command" is created with a memory-resident
  20140.               program (TSR) which can receive signals from 4DOS and process
  20141.               commands.  4DOS makes every command available to such TSRs
  20142.               before it is executed; if any TSR chooses to execute the
  20143.               command, 4DOS will do no further processing.  Otherwise, 4DOS
  20144.               processes the command normally.
  20145.  
  20146.               The 4DOS "Installable command" interface is compatible with an
  20147.               undocumented interface present in COMMAND.COM for MS-DOS and
  20148.               PC-DOS 3.3 and above.  This interface is documented more
  20149.               thoroughly on pages 373 - 379 of the excellent reference text
  20150.               Undocumented DOS by Schulman et. al., published by Addison
  20151.               Wesley (ISBN 0-201-57064-5).
  20152.  
  20153.               4DOS looks for an installable command after alias expansion
  20154.               and after checking to see if the command is a drive change,
  20155.               but before checking for an internal or external command.
  20156.  
  20157.               4DOS first makes an INT 2Fh call to determine whether any TSR
  20158.               loaded will respond to the command, with:
  20159.  
  20160.                     AX = AE00h
  20161.                     BX = offset of command line buffer:
  20162.  
  20163.  
  20164.           ___________________________________________________________________
  20165.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  346
  20166.  
  20167.                                            APPENDIX C / TECHNICAL INFORMATION
  20168.           ___________________________________________________________________
  20169.  
  20170.  
  20171.                            first byte = maximum length of command line (128)
  20172.                            second byte = actual length of command line, not
  20173.                               including trailing CR
  20174.                            remainder = command line, with a trailing CR
  20175.                     CH = FFh
  20176.                     CL = length of command line, not including the command
  20177.                          name
  20178.                     DX = FFFFh
  20179.                     SI = offset of command name buffer:
  20180.                            first byte = length of command name
  20181.                            remainder = command name, shifted to upper case
  20182.                               and padded with blanks to 11 characters
  20183.                     DI = 0
  20184.  
  20185.               If the TSR does not recognize the command as its own, it must
  20186.               pass the INT 2Fh along with registers unchanged.  If it does
  20187.               recognize the command, it must return 0FFh in AL.  The command
  20188.               should not be executed at this point.  4DOS will then make
  20189.               another call (buffer formats are the same as above):
  20190.  
  20191.                     AX = AE01h
  20192.                     BX = offset of command line buffer
  20193.                     CH = 0
  20194.                     CL = length of command name
  20195.                     DX = FFFFh
  20196.                     SI = offset of command name buffer
  20197.  
  20198.               If the TSR executed the command line, it must set the command
  20199.               name length (DS:[SI]) to 0.  If the command name length is not
  20200.               0, 4DOS will attempt to execute the command as an internal or
  20201.               external command.  This allows the TSR to return a modified
  20202.               command line to 4DOS by modifying the command line buffer at
  20203.               DS:BX, and leaving the command name length byte at DS:[SI] set
  20204.               to a non-zero value.  If the command is executed, the TSR
  20205.               should return the result of the command (zero for normal
  20206.               return or non-zero for an error) in AL.
  20207.  
  20208.  
  20209.           Using DESCRIPT.ION
  20210.  
  20211.               4DOS uses the file DESCRIPT.ION to store file descriptions.
  20212.               This file is created as a hidden file in each subdirectory
  20213.               which has descriptions, and deleted when all descriptions are
  20214.               removed or when all files with descriptions are deleted.
  20215.  
  20216.               Your programs can access DESCRIPT.ION to create, retrieve, or
  20217.               modify file descriptions, and to store other information.
  20218.  
  20219.  
  20220.  
  20221.           ___________________________________________________________________
  20222.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  347
  20223.  
  20224.                                            APPENDIX C / TECHNICAL INFORMATION
  20225.           ___________________________________________________________________
  20226.  
  20227.  
  20228.               DESCRIPT.ION has one line per file, and is unsorted.  Each
  20229.               line is in the following format:
  20230.  
  20231.                    filename.ext Description[*<ID>Other program info]...<CR>
  20232.  
  20233.               There is normally one space between the description and
  20234.               filename but additional spaces may be used in future versions
  20235.               of 4DOS.  The characters after the description allow extension
  20236.               of the description format for use by other programs.  They are
  20237.               as follows:
  20238.  
  20239.                    * represents an ASCII Ctrl-D (04), and marks the end of
  20240.                    the description text and the beginning of information for
  20241.                    a program other than 4DOS.  This symbol can appear
  20242.                    multiple times on each line; each occurrence marks the
  20243.                    beginning of information for another program.
  20244.  
  20245.                    <ID> is an identification byte for the program which is
  20246.                    using this area of the particular line.  If you are
  20247.                    writing a program which will store information in
  20248.                    DESCRIPT.ION, test it using an ID byte of your own
  20249.                    choosing.  When you are ready to release the program,
  20250.                    contact JP Software and we will provide you with an ID
  20251.                    byte value that is not in use by others to the best of
  20252.                    our knowledge.
  20253.  
  20254.                    Other program info is any text the program wishes to
  20255.                    store in its area of the line.  The text should relate
  20256.                    specifically to the file named on the line.  It may not
  20257.                    contain the Ctrl-D character, carriage returns, line
  20258.                    feeds, or nulls (ASCII 0s).
  20259.  
  20260.               4DOS will copy, delete, or move all the information on a line
  20261.               in DESCRIPT.ION, including information owned by other
  20262.               programs, when performing the same action on the corresponding
  20263.               file.  4DOS will also change the name if a file is renamed.
  20264.               To support DESCRIPT.ION properly, your program must do the
  20265.               same if it copies, deletes, moves, or renames files.  Take
  20266.               care not to remove information which does not belong to your
  20267.               program, or delete lines which contain information for other
  20268.               programs.  Your program should be able to handle a line
  20269.               terminated by a CR or LF alone, a CR/LF pair, an EOF (ASCII
  20270.               26), or the physical end of the file.  The lines it creates
  20271.               should be terminated with CR / LF.  The line length limit is
  20272.               4096 bytes; exceeding this limit will cause unpredictable
  20273.               results.
  20274.  
  20275.  
  20276.  
  20277.  
  20278.           ___________________________________________________________________
  20279.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  348
  20280.  
  20281.                                            APPENDIX C / TECHNICAL INFORMATION
  20282.           ___________________________________________________________________
  20283.  
  20284.  
  20285.  
  20286.  
  20287.           Interrupt 2E
  20288.  
  20289.               4DOS provides full, documented support for the undocumented
  20290.               COMMAND.COM "back door" entry, INT 2E (hex).  INT 2E allows
  20291.               applications to call the primary copy of the command processor
  20292.               to execute commands, without loading a secondary shell.
  20293.  
  20294.               INT 2E support is enabled with the FullINT2E = Yes directive
  20295.               in 4DOS.INI.  If this directive is left out or is set to No,
  20296.               4DOS does "hook" INT 2E, but any calls to it are ignored.
  20297.               Setting FullINT2E = Yes adds about 100 bytes to the resident
  20298.               size of 4DOS, and applies only to the primary shell (it is
  20299.               ignored in secondary shells).
  20300.  
  20301.               To use INT 2E, set DS:SI to the address of a buffer containing
  20302.               the command, then issue an INT 2E.  The buffer format is:
  20303.  
  20304.                    First byte      Length of command, not including this
  20305.                                    byte or the last byte
  20306.                    Text bytes      The command text
  20307.                    Last byte       CR (ASCII 13)
  20308.  
  20309.               You must have enough memory available for 4DOS to reload its
  20310.               transient portion, and about 80 bytes of available stack space
  20311.               for the INT 2E handler to use.  INT 2E can not be called from
  20312.               a TSR while 4DOS is running (for example, a TSR popped up at
  20313.               the 4DOS prompt or from within LIST or SELECT), but can be
  20314.               called from within any application or from within a TSR while
  20315.               an application (including the 4DOS HELP system) is running.
  20316.  
  20317.               INT 2E can invoke any 4DOS command including an alias, an
  20318.               internal command, an external command, or a batch file.  All
  20319.               changes to 4DOS data (such as aliases, environment variables,
  20320.               and SETDOS settings) which are made by a command executed via
  20321.               INT 2E calls will affect the primary shell, and the
  20322.               environment passed to a program called via INT 2E will be a
  20323.               copy of the primary shell's environment.
  20324.  
  20325.               INT 2E uses the same internal stack (temporary storage area)
  20326.               as the primary shell.  If a complex command is used in the
  20327.               primary shell to start a program which eventually issues an
  20328.               INT 2E, the additional stack space required by commands
  20329.               executed through INT 2E may (in rare circumstances) cause a
  20330.               stack overflow.  If this occurs, use the StackSize directive
  20331.               in 4DOS.INI (see page 140) to increase 4DOS's internal stack
  20332.               space.
  20333.  
  20334.  
  20335.           ___________________________________________________________________
  20336.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  349
  20337.  
  20338.                                            APPENDIX C / TECHNICAL INFORMATION
  20339.           ___________________________________________________________________
  20340.  
  20341.  
  20342.  
  20343.               INT 2E also uses the same batch file "stack" as the primary
  20344.               shell.  This means that if INT 2E is used to execute a batch
  20345.               file, this batch file is considered "nested" within any batch
  20346.               file(s) used in the primary shell to start the program which
  20347.               issued the INT 2E.  This may cause batch nesting errors from
  20348.               within the INT 2E call which would not occur if the same
  20349.               command were executed at the prompt.  For example, suppose an
  20350.               application is loaded from batch files nested six levels deep,
  20351.               and that application uses INT 2E to execute a command which
  20352.               invokes batch files which nest to five levels deep.  Under
  20353.               these conditions a nesting error will occur, because the total
  20354.               nesting level is eleven, exceeding 4DOS's limit of ten levels
  20355.               of nested batch files.
  20356.  
  20357.               On return from INT 2E all registers will be destroyed except
  20358.               SS and SP.  AX will be set as follows:
  20359.  
  20360.                  FFFFh   An error occurred before processing the command: not
  20361.                          enough memory was available, INT 2E was called from
  20362.                          a TSR, or another error made it impossible to handle
  20363.                          the interrupt.
  20364.  
  20365.                  0       The command was processed without error.
  20366.  
  20367.                  > 0     There was an error in processing the command.  AX is
  20368.                          the error number, equivalent to the IERRORLEVEL
  20369.                          (%_?) value from an internal command or the
  20370.                          ERRORLEVEL (%?) value from an external command.  If
  20371.                          a batch file is run the value will be the error
  20372.                          level returned by the batch file (via QUIT n or
  20373.                          CANCEL n) or the last command within it.  If an
  20374.                          alias is run the value will be the error level
  20375.                          returned by the last command in the alias.
  20376.  
  20377.  
  20378.  
  20379.  
  20380.  
  20381.  
  20382.  
  20383.  
  20384.  
  20385.  
  20386.  
  20387.  
  20388.  
  20389.  
  20390.  
  20391.  
  20392.           ___________________________________________________________________
  20393.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  350
  20394.  
  20395.                                                                      GLOSSARY
  20396.           ___________________________________________________________________
  20397.  
  20398.  
  20399.  
  20400.           GLOSSARY
  20401.  
  20402.  
  20403.           Some items in this glossary refer to 4DOS features.  For more
  20404.           information on how a particular feature works, look the feature up
  20405.           in the index under the name used here.
  20406.  
  20407.               4DOS.INI:  The 4DOS initialization file containing directives
  20408.               which set 4DOS's startup configuration parameters.
  20409.  
  20410.               4EXIT:  A batch file which is executed whenever a secondary
  20411.               4DOS shell ends.
  20412.  
  20413.               4START:  A batch file which is executed whenever 4DOS is
  20414.               started, either as a primary shell or a secondary shell.
  20415.  
  20416.               Alias:  A shorthand name for a command or series of commands.
  20417.  
  20418.               Alias Argument:  A numeric variable included in an alias
  20419.               definition, allowing a different value to be used in the alias
  20420.               each time it is executed.
  20421.  
  20422.               AND:  A logical combination of two true or false conditions
  20423.               such that if both conditions are true the result is true; if
  20424.               either condition is false the result is false.
  20425.  
  20426.               ANSI.SYS:  A device driver supplied with DOS which provides
  20427.               enhanced screen display and keyboard macros, or one of the
  20428.               many similar programs.
  20429.  
  20430.               Append:  Concatenation of one file or string onto the end of
  20431.               another.  (There is also a DOS external command, APPEND, which
  20432.               has an entirely different meaning and which should be used
  20433.               with caution!)
  20434.  
  20435.               Application:  A program run from the command prompt or a batch
  20436.               file.  The term is used broadly to mean any program other than
  20437.               the command processor; and more narrowly to mean a program
  20438.               with a specific purpose such as a spreadsheet or word
  20439.               processing program, as opposed to a utility.
  20440.  
  20441.               Archive:  A file attribute indicating that the file has been
  20442.               modified since the last backup (presuming that the last backup
  20443.               cleared the archive attribute, as most backup programs do).
  20444.               Also sometimes used to refer to a single file which contains a
  20445.               number of other files in compressed form.
  20446.  
  20447.  
  20448.  
  20449.           ___________________________________________________________________
  20450.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  351
  20451.  
  20452.                                                                      GLOSSARY
  20453.           ___________________________________________________________________
  20454.  
  20455.  
  20456.  
  20457.               Argument:  A piece of additional information placed after a
  20458.               command or function name.  For example in the command DIR XYZ,
  20459.               XYZ is an argument.  Also used to refer to an alias argument
  20460.               or batch file argument.
  20461.  
  20462.               ASCII:  The American Standard Code for Information
  20463.               Interchange, which defines numeric values for 128 different
  20464.               characters comprising the English alphabet, numbers,
  20465.               punctuation, and some control characters.
  20466.  
  20467.               ASCII File:  A file containing ASCII text, as opposed to a
  20468.               binary file which may contain codes, numbers, or other
  20469.               information that cannot be sensibly interpreted as text.
  20470.  
  20471.               Attribute:  A characteristic of a file which can be set or
  20472.               cleared.  The standard attributes are Read-Only, Hidden,
  20473.               System, and Archive.  The special attributes Volume Label and
  20474.               Directory are also used for files of those types.
  20475.  
  20476.               AUTOEXEC.BAT:  A batch file which is AUTOmatically EXECuted
  20477.               when the computer is started.
  20478.  
  20479.               Automatic Directory Change:  A 4DOS feature which allows
  20480.               changing directories by typing the directory name and a
  20481.               backslash [\] at the prompt.
  20482.  
  20483.               Base Memory:  The portion of your computer's memory available
  20484.               for use by DOS, the command processor, and application
  20485.               programs.  On most PCs this area consists of the first 640K
  20486.               bytes of the computer's memory (one K is 1024 bytes).
  20487.  
  20488.               BAT File:  Same as a Batch File.
  20489.  
  20490.               Batch File:  A text file containing a sequence of DOS or 4DOS
  20491.               commands.  Batch files are used to save command sequences so
  20492.               that they can be re-executed at any time, transferred to
  20493.               another system, etc.
  20494.  
  20495.               Batch File Argument:  A numeric variable used within a batch
  20496.               file, allowing a different value to be used at that spot in
  20497.               the file each time it is executed.
  20498.  
  20499.               Binary File:  A file containing information which does not
  20500.               represent or cannot sensibly be interpreted as text.  See also
  20501.               ASCII File.
  20502.  
  20503.  
  20504.  
  20505.  
  20506.           ___________________________________________________________________
  20507.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  352
  20508.  
  20509.                                                                      GLOSSARY
  20510.           ___________________________________________________________________
  20511.  
  20512.  
  20513.  
  20514.               Block Device:  A physical device for input or output which can
  20515.               transmit or receive large blocks of data while the computer is
  20516.               engaged in other activities.  Examples include disk, tape, and
  20517.               CD-ROM drives, and many networks.
  20518.  
  20519.               Boot:  The process of starting the computer and loading DOS
  20520.               and the command processor into memory.
  20521.  
  20522.               Boot Directory:  The current directory at the time the system
  20523.               is booted, almost always the root directory of the boot drive.
  20524.  
  20525.               Boot Drive:  The disk drive that the system is booted from,
  20526.               usually A: (the floppy disk) or C: (the hard disk).
  20527.  
  20528.               Break: A signal sent to a program (including 4DOS) to tell it
  20529.               to halt what it is doing.  The Ctrl-C key  or Ctrl-Break key
  20530.               is used to send this signal.  Some external commands abort
  20531.               when they receive a break signal; others return to a previous
  20532.               screen or menu, or abort the current operation.
  20533.  
  20534.               BTM File:  A special type of batch file which is loaded into
  20535.               memory, dramatically speeding up execution.
  20536.  
  20537.               Buffer:  An area of memory set aside for storage.  Usually
  20538.               refers to disk buffers, used to save information as it is
  20539.               transferred between your program and the disk; or to the
  20540.               keyboard buffer, which holds keystrokes until a program can
  20541.               use them.
  20542.  
  20543.               Character Device:  A physical device for input or output which
  20544.               must communicate with your computer one character at a time.
  20545.               Examples include the console, communications ports, and
  20546.               printers.
  20547.  
  20548.               Code Page:  A set of definitions which tells DOS how to get
  20549.               and display date, time, and other information in the format
  20550.               appropriate to a particular country.
  20551.  
  20552.               Command Completion:  A 4DOS feature which allows you to recall
  20553.               a previous command by typing the first few letters of the
  20554.               command, then an up-arrow or down-arrow.
  20555.  
  20556.               Command Echoing:  A feature which displays commands as they
  20557.               are executed.  Echoing can be turned on and off.
  20558.  
  20559.  
  20560.  
  20561.  
  20562.  
  20563.           ___________________________________________________________________
  20564.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  353
  20565.  
  20566.                                                                      GLOSSARY
  20567.           ___________________________________________________________________
  20568.  
  20569.  
  20570.  
  20571.               Command History:  A 4DOS feature which retains commands you
  20572.               have previously executed, so that they can be modified and re-
  20573.               executed later.
  20574.  
  20575.               Command Interpreter:  A program, such as 4DOS or COMMAND.COM,
  20576.               which interprets commands and executes other programs.
  20577.  
  20578.               Command Recall:  See Command History.
  20579.  
  20580.               Command Tail:  The portion of a command consisting of all the
  20581.               arguments, i.e. everything but the command name itself.
  20582.  
  20583.               Compound Command:  See Multiple Commands.
  20584.  
  20585.               COMSPEC:  An environment variable which defines where to get
  20586.               the command processor for a secondary shell.
  20587.  
  20588.               Conditional Commands:  A 4DOS feature allowing commands to be
  20589.               executed or skipped depending on the results of a previous
  20590.               command.   See also Exit Code.
  20591.  
  20592.               CONFIG.SYS:  A file which tells DOS what device drivers to
  20593.               install, what command processor to use, and other information
  20594.               about what to do when your system boots.  See your DOS manual
  20595.               for more information.
  20596.  
  20597.               Console:  The PC keyboard and display.
  20598.  
  20599.               Control Character:  A character which is part of the ASCII
  20600.               code, but does not have a normal text representation, and
  20601.               which can be generated by pressing the Ctrl key along with
  20602.               another key.  For example the control character called "BEL"
  20603.               is generated by pressing Ctrl-G, and will cause the computer
  20604.               to beep if pressed at the DOS prompt.
  20605.  
  20606.               Country Code:  See Code Page.
  20607.  
  20608.               CR:  The ASCII character "carriage return", generated by
  20609.               pressing the "Enter" key on the keyboard, and stored in most
  20610.               ASCII files at the end of each line.
  20611.  
  20612.               Critical Error:  An error, usually related to input, output,
  20613.               or network access, which prevents a program from continuing.
  20614.               When a critical error occurs, a prompt such as "R(etry),
  20615.               I(gnore), F(ail), or A(bort)" appears on the screen and you
  20616.               must decide what action to take.
  20617.  
  20618.  
  20619.  
  20620.           ___________________________________________________________________
  20621.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  354
  20622.  
  20623.                                                                      GLOSSARY
  20624.           ___________________________________________________________________
  20625.  
  20626.  
  20627.  
  20628.               Current Directory:  The directory in which all file operations
  20629.               will take place unless otherwise specified.  For example if
  20630.               the current directory is C:\MYFILES then the command "DEL XYZ"
  20631.               will delete the file XYZ in the directory C:\MYFILES, and will
  20632.               not affect other files with the same name which may be in
  20633.               other directories.
  20634.  
  20635.               Description:  A string of characters assigned to describe a
  20636.               file with the 4DOS DESCRIBE command.
  20637.  
  20638.               Destination:  In the 4DOS file commands (COPY, MOVE, and
  20639.               RENAME), the name or directory files should have after any
  20640.               copying or modification has taken place; generally referred to
  20641.               by the last specification on the command line.  See also
  20642.               Source.
  20643.  
  20644.               Device:  A physical device for input or output such as the
  20645.               console, a communications port, or a printer.  Sometimes the
  20646.               term "device" alone is used to refer to character devices such
  20647.               as those listed above, and excludes block devices.
  20648.  
  20649.               Device Driver:  A program which allows DOS to communicate with
  20650.               a device, and which is loaded into memory when the system is
  20651.               booted, via a statement in CONFIG.SYS.  Some device drivers
  20652.               are used to manage memory or for other similar internal
  20653.               functions, rather than to communicate with an external device.
  20654.  
  20655.               Directory:  A portion of any disk, identified by a name and a
  20656.               relationship to other directories in a "tree" structure, with
  20657.               the tree starting at the root directory.  A directory
  20658.               separates files on the disk into logical groups, but does not
  20659.               represent a physical division of the data on the disk.
  20660.  
  20661.               Disk Swapping:  A type of swapping in which the transient
  20662.               portion of 4DOS is stored on disk while an application is
  20663.               running.
  20664.  
  20665.               DOS Memory:  See Base Memory.
  20666.  
  20667.               Echo:  See Command Echoing.
  20668.  
  20669.               EMS Memory:  Memory which conforms to the Lotus - Intel -
  20670.               Microsoft Expanded Memory Specification (LIM EMS).  This
  20671.               hardware/software standard allows programs to access large
  20672.               amounts of memory outside of base memory or extended memory.
  20673.               Most systems which have EMS memory have either a specific EMS
  20674.               board (on any PC or compatible system), EMS emulation software
  20675.  
  20676.  
  20677.           ___________________________________________________________________
  20678.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  355
  20679.  
  20680.                                                                      GLOSSARY
  20681.           ___________________________________________________________________
  20682.  
  20683.  
  20684.               (on PC-AT compatible systems), or a 386 control program such
  20685.               as QEMM or 386MAX (on 386 systems).  If you do not have one of
  20686.               these items, you probably do not have EMS memory.
  20687.  
  20688.               EMS Swapping:  A type of swapping in which the transient
  20689.               portion of 4DOS is stored in EMS memory while an application
  20690.               is running.
  20691.  
  20692.               Environment:  An area of memory which contains multiple
  20693.               entries in the form "NAME=value".  Each entry is called an
  20694.               environment variable.  See also Master Environment and Passed
  20695.               Environment.
  20696.  
  20697.               Environment Variable:  The name of a single entry in the
  20698.               environment.  Environment variables are entered with the SET
  20699.               command, and used to associate the specified value with the
  20700.               specified name for any purpose desired by the user.
  20701.               Typically, their function is to set default switches for a
  20702.               program, specify a directory path where files can be found,
  20703.               and so on.  When 4DOS encounters an environment variable name
  20704.               in a command in the form "%NAME" (or "%NAME%"), it substitutes
  20705.               the corresponding value in its place.
  20706.  
  20707.               Errorlevel:  A numeric value between 0 and 255 returned from
  20708.               an external command to indicate its result (e.g., success,
  20709.               failure, response to a question), and accessible via the IF
  20710.               ERRORLEVEL command and the %? environment variable.  See also
  20711.               Exit Code.
  20712.  
  20713.               Escape Character:  This term has two meanings.  In some
  20714.               contexts it means the 4DOS escape character, normally Ctrl-X,
  20715.               which is used to suppress the normal meaning of or give
  20716.               special meaning to the following character.  In other cases it
  20717.               refers to the specific ASCII character ESC.  The meaning must
  20718.               be determined from the context.
  20719.  
  20720.               Executable Extensions:  A 4DOS feature which allows you to
  20721.               specify the application to be executed when a file with a
  20722.               particular extension is named at the command prompt.
  20723.  
  20724.               Executable File:  A file with the extension .COM or .EXE,
  20725.               which can be loaded into memory and run as a program.
  20726.  
  20727.               Exit Code:  The error level returned by an external command,
  20728.               or a similar exit code returned by a 4DOS internal command.
  20729.               4DOS internal commands return an exit code of 0 if successful,
  20730.               or non-zero if unsuccessful.  See also Errorlevel.
  20731.  
  20732.  
  20733.  
  20734.           ___________________________________________________________________
  20735.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  356
  20736.  
  20737.                                                                      GLOSSARY
  20738.           ___________________________________________________________________
  20739.  
  20740.  
  20741.  
  20742.               Expansion:  The process 4DOS goes through when it scans a
  20743.               command line and substitutes the appropriate actual values for
  20744.               aliases, alias arguments, batch file arguments, and
  20745.               environment variables.  See also Parsing.
  20746.  
  20747.               Extended ASCII Character:  A character which is not part of
  20748.               the standard set of 128 ASCII characters, but is used on the
  20749.               PC as part of an extended set of 256 characters.  These
  20750.               characters include international language symbols, and box and
  20751.               line drawing characters.
  20752.  
  20753.               Extended Memory:  Any memory on a 286-based (PC-AT compatible)
  20754.               or 386-based computer system which is above the 1 MB (one
  20755.               megabyte, or 1024*1024 bytes) of memory that DOS can address
  20756.               directly.  Any PC-AT compatible or 386 system with more than
  20757.               640K of memory has extended memory.  This memory can be used
  20758.               for a variety of purposes depending on the software installed
  20759.               to utilize it.  See also XMS.
  20760.  
  20761.               External Command:  A program which resides in an executable
  20762.               file, as opposed to an internal command which is part of the
  20763.               command processor.  For example, FORMAT and DISKCOPY are
  20764.               external commands; you can find them on your DOS disk under
  20765.               the names FORMAT.COM and DISKCOPY.COM.
  20766.  
  20767.               File Attribute:  See Attribute.
  20768.  
  20769.               File Description:  See Description.
  20770.  
  20771.               Filename Completion:  A 4DOS feature which allows you to type
  20772.               part of a filename on the command line, and have 4DOS fill in
  20773.               the rest for you.
  20774.  
  20775.               Free Memory:  Usually, the amount of base memory which is
  20776.               currently unoccupied and available for use by applications.
  20777.  
  20778.               Hidden:  A file attribute indicating that the file should not
  20779.               be displayed with a normal DIR command, and should not be
  20780.               available for access by programs unless they specifically
  20781.               request use of hidden files.
  20782.  
  20783.               History:  See Command History.
  20784.  
  20785.               History Window:  A pop-up window used by 4DOS to display the
  20786.               command history, allowing you to choose a previous command to
  20787.               modify and / or execute.
  20788.  
  20789.  
  20790.  
  20791.           ___________________________________________________________________
  20792.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  357
  20793.  
  20794.                                                                      GLOSSARY
  20795.           ___________________________________________________________________
  20796.  
  20797.  
  20798.  
  20799.               Include List:  A concise method of specifying several files or
  20800.               groups of files in the same directory, for use with all 4DOS
  20801.               commands which take file names as arguments.
  20802.  
  20803.               Insert Mode:  When editing text, a mode in which newly typed
  20804.               characters are inserted into the line at the cursor position,
  20805.               rather than overwriting existing characters on the line.  See
  20806.               also Overstrike Mode.
  20807.  
  20808.               Internal Command:  A command which is part of the command
  20809.               processor, as opposed to an external command.  For example,
  20810.               DIR and COPY are internal commands.
  20811.  
  20812.               Keyboard Buffer:  A buffer which holds keystrokes you have
  20813.               typed that have not yet been used by the currently executing
  20814.               program.
  20815.  
  20816.               Keystroke Alias:  An alias assigned to a key, so that it can
  20817.               be invoked or recalled with a single keystroke.
  20818.  
  20819.               Label:  A marker in a batch file.  Labels allow GOTO and GOSUB
  20820.               commands to "jump" to the command on the line following the
  20821.               label.  See also Volume Label.
  20822.  
  20823.               LF:  The ASCII character "line feed", not usually generated
  20824.               from the keyboard, but stored in most ASCII files at the end
  20825.               of each line after the CR character.
  20826.  
  20827.               Master Environment:  The master copy of the environment
  20828.               maintained by the command processor.  The master environment
  20829.               is manipulated with the SET, ESET, and UNSET commands.
  20830.  
  20831.               Memory Resident Mode:  A method of installing 4DOS in which
  20832.               swapping is disabled, and all of 4DOS remains permanently
  20833.               resident in memory.  Memory-resident mode requires much more
  20834.               memory than the normal swapping mode.
  20835.  
  20836.               Modulo:  The remainder after an integer division.  For example
  20837.               11 modulo 3 is 2, because when 11 is divided by 3 the
  20838.               remainder is 2.
  20839.  
  20840.               Multiple Commands:  A 4DOS feature which allows multiple
  20841.               commands to be placed on a line, separated by a caret (^) or
  20842.               other user-defined character.
  20843.  
  20844.               Multitasking:  A capability of some software (and the related
  20845.               hardware) which allows two or more programs to run apparently
  20846.  
  20847.  
  20848.           ___________________________________________________________________
  20849.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  358
  20850.  
  20851.                                                                      GLOSSARY
  20852.           ___________________________________________________________________
  20853.  
  20854.  
  20855.               simultaneously on the same computer.  Multitasking software
  20856.               for PC compatible systems includes programs like DESQview.
  20857.  
  20858.               Non-Swapping Mode:  See Memory Resident Mode.
  20859.  
  20860.               Option:  See Switch.
  20861.  
  20862.               OR:  A logical combination of two true or false conditions
  20863.               such that if both conditions are false the result is false; if
  20864.               either condition is true the result is true.
  20865.  
  20866.               Overstrike Mode:  When editing text, a mode in which newly
  20867.               typed characters overwrite existing characters on the line,
  20868.               rather than being inserted into the line at the cursor
  20869.               position.  See also Insert Mode.
  20870.  
  20871.               Parameter:  See Argument.
  20872.  
  20873.               Parsing:  The process 4DOS performs when it analyzes the
  20874.               command line, performs alias and environment variable
  20875.               expansion, and finds the appropriate internal command or
  20876.               external command to execute.
  20877.  
  20878.               Passed Environment:  A copy of the master environment created
  20879.               before running an application, so that any changes made by the
  20880.               application will not affect the master environment.  The size
  20881.               of the passed environment is determined by the amount of space
  20882.               actually used in the master environment when the application
  20883.               is started.
  20884.  
  20885.               Path:  A specification of the directories a file resides in,
  20886.               including all parent directories.  For example, the path for
  20887.               C:\WPFILES\MYDIR\MEMO.TXT is C:\WPFILES\MYDIR\.  Path is also
  20888.               used to refer to the environment variable PATH, which contains
  20889.               a series of path specifications used when searching for
  20890.               external commands and batch files.
  20891.  
  20892.               Pipe:  A method for collecting the standard output of one
  20893.               program and passing it on as the standard input of the next
  20894.               program to be executed, signified by a vertical bar "|" on the
  20895.               command line. See also Redirection.
  20896.  
  20897.               Primary Shell:  The copy of the command processor which is
  20898.               loaded when the system boots.
  20899.  
  20900.               RAM Disk:  A pseudo "disk drive", created by software, which
  20901.               appears like a normal physical disk drive to programs.  RAM
  20902.               disks can be stored in extended memory, XMS memory, EMS
  20903.  
  20904.  
  20905.           ___________________________________________________________________
  20906.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  359
  20907.  
  20908.                                                                      GLOSSARY
  20909.           ___________________________________________________________________
  20910.  
  20911.  
  20912.               memory, or base memory, and provide a convenient way for
  20913.               programs to use this memory for temporary files.
  20914.  
  20915.               Read-Only:  A file attribute indicating that the file can be
  20916.               read, but not written by DOS and 4DOS.
  20917.  
  20918.               Reboot:  The process of restarting the computer, usually by
  20919.               pressing the Ctrl, Alt, and Del keys simultaneously.
  20920.  
  20921.               Redirection:  A method for collecting the standard output of a
  20922.               program in a file, and/or of providing the standard input for
  20923.               a program from a file, signified respectively by a greater
  20924.               than symbol ">" or less than symbol "<" on the command line.
  20925.               See also Pipe.
  20926.  
  20927.               Replaceable Parameter:  See Alias Argument and Batch File
  20928.               Argument.
  20929.  
  20930.               Resident Portion:  The small portion of 4DOS stored
  20931.               permanently in memory when swapping mode is in use, as opposed
  20932.               to the larger transient portion.  The resident portion is
  20933.               stored as close as possible to the beginning of base memory.
  20934.  
  20935.               Root Directory:  The first directory, from which all other
  20936.               directories are "descended."  The root directory is referenced
  20937.               with a single backslash (\).  When a disk is first formatted,
  20938.               it is the only directory.
  20939.  
  20940.               Secondary Shell:  Any copy of any command processor which is
  20941.               loaded after the system boots.  Secondary shells may be
  20942.               started from the command line; by executing a "shell to DOS"
  20943.               operation from within an application; implicitly by executing
  20944.               some DOS-related functions within certain applications; or by
  20945.               starting a new partition in a multi-tasking or task switching
  20946.               system.
  20947.  
  20948.               Shell:  A command processor.  Also used to refer to a program
  20949.               which gives access to DOS functions and commands through a
  20950.               menu- or mouse-driven system.
  20951.  
  20952.               Source:  In the 4DOS file commands (COPY, MOVE, and RENAME),
  20953.               the original files before any copying or modification has
  20954.               taken place, i.e. those specified earlier on the command line.
  20955.               See also Target.
  20956.  
  20957.               Stack:  An area of memory used by any program to store
  20958.               temporary data while the program is running; more generally,
  20959.  
  20960.  
  20961.  
  20962.           ___________________________________________________________________
  20963.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  360
  20964.  
  20965.                                                                      GLOSSARY
  20966.           ___________________________________________________________________
  20967.  
  20968.  
  20969.               any such storage area where the last item stored is normally
  20970.               the first one removed.
  20971.  
  20972.               Standard Error:  A file or character device where error
  20973.               messages from a program are displayed.  Standard error output
  20974.               always goes to the console, unless redirection is used.
  20975.  
  20976.               Standard Input:  A file or character device where a program
  20977.               obtains its normal input.  Standard input always comes from
  20978.               the console, unless redirection is used.
  20979.  
  20980.               Standard Output:  A file or character device where normal
  20981.               output from a program is displayed.  Standard output always
  20982.               goes to the console, unless redirection is used.
  20983.  
  20984.               Subdirectory:  Any directory other than the root directory.
  20985.               See also Root Directory.
  20986.  
  20987.               Swap File:  A disk file created by 4DOS to store its transient
  20988.               portion when disk swapping is in use.
  20989.  
  20990.               Swapping:  A 4DOS feature which removes the larger transient
  20991.               portion of 4DOS from base memory while an application is
  20992.               running, leaving the maximum possible amount of memory for the
  20993.               application, and allows 4DOS to restore information such as
  20994.               the command history after the application is finished.  See
  20995.               also XMS Swapping, EMS Swapping, and Disk Swapping.
  20996.  
  20997.               Switch:  An argument to an internal command or application
  20998.               which specifies a particular behavior or setting.  For
  20999.               example, the command "DIR /P" might be referred to as "having
  21000.               the /P switch set".  Also, a configuration value for 4DOS
  21001.               specified on the SHELL= line in CONFIG.SYS.
  21002.  
  21003.               System:  A file attribute indicating that the file belongs to
  21004.               DOS and should not be accessed by normal programs.
  21005.  
  21006.               Target:  See Destination.
  21007.  
  21008.               Transient Portion:  The larger portion of 4DOS stored in
  21009.               memory temporarily when swapping mode is in use, as opposed to
  21010.               the smaller resident portion.  The transient portion is stored
  21011.               as close as possible to the end of base memory, and releases
  21012.               the space it is using whenever an application is executed.
  21013.  
  21014.               TSR:  A Terminate and Stay Resident program, i.e. a program
  21015.               which "terminates" but remains resident in base memory, to
  21016.  
  21017.  
  21018.  
  21019.           ___________________________________________________________________
  21020.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  361
  21021.  
  21022.                                                                      GLOSSARY
  21023.           ___________________________________________________________________
  21024.  
  21025.  
  21026.               provide capabilities such as network support, a pop-up notepad
  21027.               or telephone dialer, a disk cache, or mouse support.
  21028.  
  21029.               UMB:  An XMS Upper Memory Block, whose address is above the
  21030.               end of normal base memory, but is within the 1 megabyte of
  21031.               memory that DOS can address directly.
  21032.  
  21033.               Variable:  See Alias Argument, Batch File Argument, and
  21034.               Environment Variable.
  21035.  
  21036.               Volume Label:  A special, hidden file placed on any disk whose
  21037.               name constitutes a "label" for the entire disk.
  21038.  
  21039.               White Space Character:  Generally, a character used to
  21040.               separate arguments on the command line.  The white space
  21041.               characters recognized by 4DOS are the space, tab, comma,
  21042.               semicolon, and equal sign.
  21043.  
  21044.               Wildcard:  A character ("*" or "?") used in a filename to
  21045.               specify the possibility that any single character ("?") or
  21046.               sequence of characters ("*") can occur at that point in the
  21047.               actual name.
  21048.  
  21049.               XMS Memory:  A software method for accessing extended memory
  21050.               on 286 and 386 systems (and some systems which support version
  21051.               4.0 of the EMS memory specification).  XMS memory is not
  21052.               additional memory, but is a software specification only.  Its
  21053.               use generally requires Microsoft's HIMEM.SYS be installed as a
  21054.               device driver, or that another program such as 386MAX or MOVE-
  21055.               EM be used.
  21056.  
  21057.               XMS Swapping:  A type of swapping where the transient portion
  21058.               of 4DOS is stored in XMS memory while an application is
  21059.               running.
  21060.  
  21061.               XOR (exclusive OR):  A logical combination of two true or
  21062.               false conditions such that if both conditions are false or
  21063.               both conditions are true the result is false; if either
  21064.               condition is true and the other is false the result is true.
  21065.  
  21066.  
  21067.  
  21068.  
  21069.  
  21070.  
  21071.  
  21072.  
  21073.  
  21074.  
  21075.  
  21076.           ___________________________________________________________________
  21077.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  362
  21078.  
  21079.                                                                         INDEX
  21080.           ___________________________________________________________________
  21081.  
  21082.  
  21083.           INDEX
  21084.                                               ? as file name "wildcard", 71
  21085.                                               ? command, 173
  21086.           Most fully capitalized terms        ? internal variable, 82
  21087.           (e.g. ECHO, SELECT) are 4DOS        _? internal variable, 82
  21088.           command names unless otherwise
  21089.           noted.                              @ sign, see also Variable
  21090.                                                functions
  21091.                                                  for key codes
  21092.             -- Special Characters --                in 4DOS.INI, 125
  21093.                                                     in a keystroke alias, 178
  21094.                                                     in KEYSTACK text, 258
  21095.           ! warning mark, 2, 172                 in file names, 47
  21096.                                                  in INKEY results, 253
  21097.           ## advanced topic mark, 2, 54,         to define a keystroke alias,
  21098.            171                                    177
  21099.                                                  to override batch file echo,
  21100.           % sign                                  100, 222, 287
  21101.              in file names, 47                   to override command history
  21102.              use with environment                 save, 57
  21103.               variables, 78, 79                  to read a file in FOR, 230
  21104.              use with replaceable
  21105.               parameters, 95, 101, 180        || (or) in conditional
  21106.              use with variable functions,      commands, 92
  21107.               86
  21108.           %# and %n&
  21109.              changing parameter                    -- 4 --
  21110.               character, 131, 303
  21111.              in aliases, 180                  4DOS
  21112.              in batch files, 101, 306            and DESQview, see DESQview
  21113.           %0 to %127                             and DOS versions, 114, 153
  21114.              in aliases, 180                     and DR-DOS, 9, 50, 111, 114,
  21115.              in batch files, 101, 306             139, 153
  21116.                                                  and MS-DOS 5.0, 64, 114
  21117.           && (and) in conditional                and MS-DOS 5.0 memory
  21118.            commands, 92                           management, 50, 144, 145,
  21119.                                                   261
  21120.           * (asterisk)                           and other software, 153
  21121.              as file name "wildcard", 71         and Windows, see Microsoft
  21122.              in alias name, 177                   Windows
  21123.              in alias value, 175                 configuration, 80, 110, 119
  21124.              to temporarily disable an           detecting, 344
  21125.               alias, 62, 106, 177                Features, 9
  21126.                                                  memory usage, 127, 128, 140
  21127.           ., see Current directory               programming interface, 344
  21128.           .., see Parent directory               resident portion, 127
  21129.                                                     loading in high memory,
  21130.           /, in command switches, 170                128
  21131.  
  21132.  
  21133.           ___________________________________________________________________
  21134.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  363
  21135.  
  21136.                                                                         INDEX
  21137.           ___________________________________________________________________
  21138.  
  21139.  
  21140.           4DOS (continued)                    Advanced topic mark, see ##
  21141.              startup options, see Startup     ALIAS command, 167, 174
  21142.               options                         Alias directive, 125
  21143.              transient portion, 127, 140      _ALIAS internal variable, 82
  21144.           4DOS Utility Disk, 242              Aliases, 97, 174
  21145.           4DOS.COM, 114, 116                     and CANCEL, 189
  21146.           4DOS.INI, 110, 119                     and QUIT, 283
  21147.              advanced directives, 138            asterisk in name, 177
  21148.              and installation, 119               asterisk in value, 175
  21149.              and SETDOS, 121, 129, 301           back quotes in, 96, 174,
  21150.              color directives, 132                175, 180
  21151.              comments in, 120                    commands for, 168
  21152.              configuration directives,           defining default command
  21153.               129                                 options with, 176, 181
  21154.              directive types, 123                editing, 226
  21155.              directives, 120, see also           examples, 97, 104, 106
  21156.               names of individual                IFF in, 181
  21157.               directives                         in batch files, 104
  21158.              errors in, 121, 126                 inheritance in secondary
  21159.              initialization directives,           shells, 139, 182
  21160.               125                                internal variables in, 181
  21161.              key mapping directives, 133         keystroke, 98, 177
  21162.              location of, 112, 114                  and key assignments, 133
  21163.                 and multitaskers, 122               automatic execution of,
  21164.              primary section, 121                    95, 99, 179
  21165.                 in alternate files, 123          memory space for, 82, 125,
  21166.              secondary section, 121               269
  21167.                 and DESQview, 159                multiple commands in, 174
  21168.                 and multitaskers, 154            nesting, 175
  21169.                 example, 142                     order of execution, 44
  21170.           4DOS.PIF, 157                          reading from a file, 182
  21171.           4EXIT, 43, 110, 118                    removing, 315
  21172.              location of, 118, 125               replaceable parameters in,
  21173.           4OS2 product, 1                         180, 181
  21174.           4START, 43, 85, 110, 118               saving in a file, 179
  21175.              and multitaskers, 155               saving temporarily, 225, 305
  21176.              and startup command, 113            suspending execution of, 276
  21177.              and TSRs, 118                       temporarily disabling, 62,
  21178.              location of, 118, 125                106, 177
  21179.           4StartPath directive, 125              variable functions in, 91,
  21180.           _4VER internal variable, 82             181
  21181.                                               Alt-255, 55
  21182.                                               And (&&) in conditional
  21183.                -- A --                         commands, 92
  21184.                                               .AND, in IF and IFF., 245, 250,
  21185.           Abort, Retry, Fail message, see      251
  21186.            Critical errors                    ANSI directive, 129, 148, 196,
  21187.           AddFile directive, 136               197, 302
  21188.  
  21189.  
  21190.           ___________________________________________________________________
  21191.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  364
  21192.  
  21193.                                                                         INDEX
  21194.           ___________________________________________________________________
  21195.  
  21196.  
  21197.           ANSI driver, 53                          -- B --
  21198.              and CLS, 195, 302
  21199.              and COLOR, 197, 302              Back & Forth, 114, 122
  21200.              and COLORDIR, 212                Backspace character, 95
  21201.              and colors, 132                  Backspace directive, 134
  21202.              and cursor problems, 147         Base memory, see Memory
  21203.              and DESQview, 158                Base name, see File names
  21204.              and PROMPT, 279                  .BAT files, 100, 264
  21205.              and scrolling, 147, 303          Batch files, 99
  21206.              and TEXT, 309                       aliases in, 104, 105
  21207.              detecting, 82, 148                  based on command history,
  21208.              escape sequences, 95, 279,           243
  21209.               309                                branching in, 239
  21210.              in CONFIG.SYS, 148                  calling, 187
  21211.              use by 4DOS, 129, 146               capturing output of, 107
  21212.           _ANSI internal variable, 82            chaining, 108, 187
  21213.           ANSI.COM, 148                          commands for, 102, 168
  21214.           ANSI.SYS, 148                          comments in, 287
  21215.           APPEND command, 153                    debugging, 106
  21216.           Appending files, 198                   displaying messages in, 222,
  21217.           Archive attribute, see File             224, 291, 292, 309, 321
  21218.            attributes                            echoing of commands, 100,
  21219.           Argument quoting, 95                    129, 222, 304
  21220.           Arguments, see replaceable             environment variables in,
  21221.            parameters                             101
  21222.           Arithmetic, 87                         internal variables in, 85,
  21223.           ASCII, 51, 334                          101
  21224.           @ASCII variable function, 86           keyboard input in, 253, 256
  21225.           Asterisk, see *                        labels in, 237, 239
  21226.           At sign, see @ sign                    modes, 100, 264
  21227.           ATTRIB, 183                            nesting, 82, 187
  21228.           @ATTRIB variable function, 86          order of execution, 44
  21229.           Attributes, see File attributes        replaceable parameters, 101,
  21230.           AUTOEXEC.BAT, 43, 110, 116              306
  21231.              and 4START, 118                     saving environment in, 225,
  21232.              and startup command, 113             305
  21233.              location of, 126                    screen display, 218, 220,
  21234.              running, 112                         221
  21235.              setting COMSPEC in, 112             subroutines, 237, 290
  21236.              speeding up, 307                    suspending execution of, 276
  21237.              starting KSTACK.COM, 15, 69,        temporary variables in, 102
  21238.               116, 257                           terminating, 189, 283
  21239.           AutoExecPath directive, 126            timing events in, 311
  21240.           Automatic batch files, 43              tips, 104
  21241.           Automatic directory changes,           variable functions in, 91,
  21242.            61, 117                                101
  21243.                                               _BATCH internal variable, 82
  21244.  
  21245.  
  21246.  
  21247.           ___________________________________________________________________
  21248.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  365
  21249.  
  21250.                                                                         INDEX
  21251.           ___________________________________________________________________
  21252.  
  21253.  
  21254.           BatchEcho directive, 100, 129,      COLORDIR environment variable,
  21255.            304                                 81, 117, 212, 295
  21256.           BEEP, 102, 129, 185                    and DESQview, 158
  21257.           BeepFreq directive, 129                and redirection, 213
  21258.           BeepLength directive, 129           Colors, see Screen; Monochrome
  21259.           BeginLine directive, 134             monitor
  21260.           _BG internal variable, 82           _COLUMN internal variable, 83
  21261.           Boxes, drawing, 218                 _COLUMNS internal variable, 83
  21262.           BREAK, 186                          Command grouping, 92, see also
  21263.           .BTM files, 100, 264                 EXCEPT, FOR, GLOBAL, and IF
  21264.                                               Command history, see History
  21265.                                                list
  21266.                -- C --                        Command interpreter, 41
  21267.                                               Command line, 54
  21268.           CALL, 102, 109, 187                    arguments, see replaceable
  21269.           CANCEL, 102, 187, 189, 283              parameters
  21270.           Carriage return character, 95          automatic directory changes,
  21271.           Case (upper / lower), 132, 304          61
  21272.           CD, 190                                echoing of, 222, 223
  21273.           CD-ROM drives, 149                     editing, 55, 134, 136
  21274.           CDD, 192                               editing mode, 55, 130, 303
  21275.           CDPATH environment variable,           expanded, 223
  21276.            80, 117                               filename completion, 59
  21277.              and automatic directory             help, 63
  21278.               changes, 62                        history, 56, see also
  21279.              and CD, 191                          History list
  21280.              and CDD, 192                        history window, 58
  21281.              and PUSHD, 282                      input method, 131, 303
  21282.           ChangeTitle directive, 138             multiple commands, 61
  21283.           Changing directories, 61, 190,         processing of, 43
  21284.            192, 277, 281                         prompt, 278
  21285.           @CHAR variable function, 87         Command processing, 43
  21286.           CHCP, 194, 205, 213, 310            Command Reference Guide, 167
  21287.           CHDIR, 190                          Command tail, 43, 45
  21288.           ClearKeyMap directive, 134, 138     Command, 4DOS startup, 113, 115
  21289.           CLS, 103, 195                          and multitaskers, 155
  21290.              and DESQview, 158                COMMAND.COM
  21291.           CMDLINE environment variable,          in DOS version 2.x, 114
  21292.            80                                    in Microsoft Windows, 157
  21293.           Code page, 82, 194                     in multitasker DOS windows,
  21294.           _CODEPAGE internal variable, 82         154
  21295.           Cold reboot, 285                       message server, 139
  21296.           COLOR, 103, 197                     CommandEscape directive, 136
  21297.              and DESQview, 158                Commands
  21298.           ColorDir directive, 132                conditional execution of,
  21299.                                                   251
  21300.                                                  external, 44, 167, 169, 274
  21301.                                                  format of, 169
  21302.  
  21303.  
  21304.           ___________________________________________________________________
  21305.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  366
  21306.  
  21307.                                                                         INDEX
  21308.           ___________________________________________________________________
  21309.  
  21310.  
  21311.           Commands (continued)                CopyEA directive, 138, 201, 272
  21312.              help for, 63, 241                Country code, 205, 213, 280,
  21313.              internal, 44, 167                 310
  21314.                 disabling, 173, 302           CPU, 49, 143
  21315.              list of, 168, 173                _CPU internal variable, 83
  21316.              new, 169                         CritFail directive, 138, 152
  21317.              order of execution, 44, 77       Critical errors, 151
  21318.              programming interface, 346          automatic Fail response,
  21319.              types of, 168, 169                   112, 115, 138
  21320.           CommandSep directive, 130, 302      Ctrl-Break
  21321.           Comments                               checking, 186
  21322.              in 4DOS.INI, 120                    during DELAY, 208
  21323.              in alias files, 182                 during INKEY, 253
  21324.              in AUTOEXEC.BAT, 164                during PAUSE, 276
  21325.              in batch files, 287                 during SELECT, 294
  21326.              in CONFIG.SYS, 15, 16, 164       Ctrl-C, see Ctrl-Break
  21327.              in environment variable          Ctrl-X, see Escape character
  21328.               files, 300                      Ctrl-Z, 202
  21329.           Compatibility, 9, 11                CTTY, 67, 204
  21330.              with hardware, 143               Current drive and directory, 47
  21331.              with other software, 153,           changing, see Changing
  21332.               161                                 directories
  21333.           Compound character, 302                retrieving, 83
  21334.           COMSPEC environment variable,          saving temporarily, 225,
  21335.            81, 116                                277, 281, 305
  21336.              and disk swapping, 128           Cursor
  21337.              and DOS FORMAT /S, 153              positioning, 291, 292, 321
  21338.              and LOG file location, 266          shape, 129, 147, 304
  21339.              and multitaskers, 154            CursorIns directive, 129, 147,
  21340.              checking, 111                     304
  21341.              on laptop and notebook           CursorOver directive, 129, 147,
  21342.               computers, 151                   304
  21343.              removing, 316                    _CWD internal variable, 83
  21344.              setting automatically, 111       _CWDS internal variable, 83
  21345.           Conditional commands, 92            _CWP internal variable, 83
  21346.           CONFIG.SYS, 41, 110                 _CWPS internal variable, 83
  21347.              4DOS commands in, 111
  21348.              and ANSI driver, 148
  21349.              and DOS bug, 113                      -- D --
  21350.           Configuration, 4DOS, 80, 110,
  21351.            119                                Daily execution of batch file,
  21352.           CONsole device, 204, 308, see        91
  21353.            also Standard input, Standard      DATE, 205
  21354.            output, and Standard error         _DATE internal variable, 83
  21355.           Coprocessor, see Numeric            @DATE variable function, 87
  21356.            coprocessor                        Day of week, 83
  21357.           COPY, 198                           Default directory, see Current
  21358.              and extended attributes, 201      drive and directory
  21359.  
  21360.  
  21361.           ___________________________________________________________________
  21362.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  367
  21363.  
  21364.                                                                         INDEX
  21365.           ___________________________________________________________________
  21366.  
  21367.  
  21368.           Default drive, see Current          @DISKTOTAL variable function,
  21369.            drive and directory                 87
  21370.           DEL, 149, 206                          on networks, 160
  21371.           Del directive, 134                  @DISKUSED variable function, 87
  21372.           DELAY, 208                             on networks, 160
  21373.           Deleting files, 206                 Display colors, see Screen;
  21374.           DelHistory directive, 136            Video
  21375.           DelToBeginning directive, 134       DOS, 153
  21376.           DelToEnd directive, 134                APPEND command, 153
  21377.           DelWordLeft directive, 134             bug in CONFIG.SYS
  21378.           DelWordRight directive, 134             processing, 113
  21379.           DESCRIBE, 134, 209                     command interpreter, 42
  21380.           @DESCRIPT variable function, 87        commands, help for, 63, 169,
  21381.           DESCRIPT.ION, 209, see File             241
  21382.            descriptions                          compatibility box, see OS/2
  21383.           DescriptionMax directive, 130,         external commands, 167
  21384.            209                                   FORMAT /S command, 153
  21385.           Descriptions, see File                 hidden files, 41
  21386.            descriptions                          memory, see Memory
  21387.           DESQview, 139, 158                     shell (defined), 1
  21388.              and secondary shells, 114,          structure, 41
  21389.               122                                version 2.x, 111, 114
  21390.              detecting, 83, 85                _DOS internal variable, 83
  21391.           Detecting 4DOS, 344                 @DOSMEM variable function, 87
  21392.           DIR, 149, 211                       _DOSVER internal variable, 83
  21393.              and include lists, 75            _DOW internal variable, 83
  21394.              directory size limits, 214       Down directive, 135
  21395.           Directories, see Subdirectories     DR-DOS, see 4DOS and DR-DOS
  21396.           Directory stack, 281                DRAWBOX, 103, 146, 218
  21397.              clearing, 277                    DRAWHLINE, 103, 146, 220
  21398.              displaying, 217                  DRAWVLINE, 103, 146, 221
  21399.              size, 281                        Drive, see Disk drives
  21400.           DIREXIST test, in IF and IFF,       Drive letter, 46
  21401.            249                                DRSets directive, 139
  21402.           DIRS, 217, 277, 281                 _DV internal variable, 83
  21403.           Disk drives, 148                    DVCleanup directive, 139, 159
  21404.              drive letter, 46
  21405.              space on, 87, 234
  21406.              swapping to, 127, 307                 -- E --
  21407.              testing status of, 89
  21408.              volume label, 88, 320            ECHO, 222
  21409.              write verification on, 319          ANSI sequences in, 95
  21410.           _DISK internal variable, 83            at command line, 223
  21411.           @DISKFREE variable function, 87        in batch files, 100, 103,
  21412.              on networks, 160                     106, 287
  21413.           Diskless workstations, 160                default state, 129, 304
  21414.           DiskReset directive, 138, 149             inheritance, 187
  21415.                                               ECHOS, 103, 224
  21416.  
  21417.  
  21418.           ___________________________________________________________________
  21419.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  368
  21420.  
  21421.                                                                         INDEX
  21422.           ___________________________________________________________________
  21423.  
  21424.  
  21425.           Editing aliases and environment     EscapeChar directive, 130, 302
  21426.            variables, 226                     ESET, 134, 226
  21427.           EditMode directive, 130, 303           and environment variables,
  21428.           EGA, 147, 148, 194, 250                 78, 299
  21429.           ELSE, in IFF, 251                      and PATH, 162, 274
  21430.           ELSEIFF, in IFF, 251                @EVAL variable function, 87
  21431.           EMS, see Memory                     EXCEPT, 93, 140, 227
  21432.           @EMS variable function, 87             and DEL /Z, 207
  21433.           EndHistory directive, 136           @EXEC variable function, 87
  21434.           ENDIFF, in IFF, 251                 ExecLine directive, 135
  21435.           EndLine directive, 135              Executable extensions, 44, 76
  21436.           ENDLOCAL, 102, 105, 225, 305,          wildcards in, 78
  21437.            316                                EXIST test, in IF and IFF, 249
  21438.           ENDTEXT, 104, 309                   EXIT, 118, 229
  21439.           _ENV internal variable, 83          Exit code, 82, 229, 283
  21440.           EnvFree directive, 126, 299            and CALL, 188
  21441.           Environment, 48, 78, 298               and GLOBAL, 236
  21442.              loading in high memory, 128         and IF tests, 248
  21443.              master, 226, 299, 316            Expanded memory, see Memory
  21444.              memory space for                 @EXT variable function, 88
  21445.                 displaying, 269               Extended attributes
  21446.                 setting, 112, 114, 126           and COPY, 201
  21447.                 testing, 83                      and MOVE, 271
  21448.              saving temporarily, 225, 305     Extended key codes, see Key
  21449.              size, and compatibility           codes
  21450.               problems, 163                   Extended memory, see Memory
  21451.           Environment directive, 126, 299     @EXTENDED variable function, 88
  21452.           Environment variables, 48, 78,      Extension, see File names
  21453.            298                                External commands, see Commands
  21454.              and INKEY, 253
  21455.              and INPUT, 256
  21456.              characters in name, 79                -- F --
  21457.              creating, 298
  21458.              displaying, 298                  _FG internal variable, 83
  21459.              editing, 226                     File attributes, 47, 183
  21460.              expansion, 95                       and COPY, 201, 202
  21461.              nesting, 79                         and DEL, 207
  21462.              reading from a file, 299            and DIR, 211, 214, 216, 233
  21463.              referencing, 78                     and EXCEPT, 227
  21464.              removing, 316                       and GLOBAL, 235
  21465.              spaces in, 299                      and MOVE, 270, 272
  21466.           ERASE, 149, 206                        and REN, 289
  21467.           EraseLine directive, 135               and SELECT, 296
  21468.           Error level, see Exit code             setting, 183
  21469.           Error messages, 323                    subdirectory, 184
  21470.           ERRORLEVEL test, in IF and IFF,        testing, 86
  21471.            248                                   viewing, 183
  21472.           Escape character, 94, 130, 302         volume label, 184
  21473.  
  21474.  
  21475.           ___________________________________________________________________
  21476.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  369
  21477.  
  21478.                                                                         INDEX
  21479.           ___________________________________________________________________
  21480.  
  21481.  
  21482.           File descriptions, 209                   -- G --
  21483.              and disk performance, 149
  21484.              length of, 130, 209, 213,        General Concepts, 41
  21485.               296                             GLOBAL, 93, 140, 235
  21486.              programming for, 347             Glossary, 351
  21487.              retrieving, 87                   GOSUB, 103, 108, 237, 290
  21488.              sorting by, 215, 297                and FOR, 232
  21489.           File names, 45                      GOTO, 103, 239
  21490.              parts of, 45                        and IFF, 108, 252
  21491.                 separating, 88, 89            Guided Tour, 18
  21492.              shorthand for, 71
  21493.              unique, 90
  21494.           @FILEDATE variable function, 88          -- H --
  21495.           Filename completion, 59
  21496.           Files, 45                           Hard drives, 148
  21497.              adding line numbers to, 314      Hardware compatibility, see
  21498.              copying, 198                      Compatibility
  21499.              date, 48, 88, 205, 211           HELP, 63, 241
  21500.              deleting, 206                       and external commands, 169
  21501.              displaying, 262, 314                and mouse, 64
  21502.              moving, 270, 288                    location of files, 126
  21503.              reading, in FOR, 230                on monochrome screen, 151,
  21504.              renaming, 288                        242
  21505.              retrieving lines from, 88           options, 126, 151, 242
  21506.              searching for, 89                Help directive, 136
  21507.              selecting, 293                   HELPCFG program, 151, 241
  21508.              size of, 88, 211                 HelpOptions directive, 126, 151
  21509.              time stamp, 48, 88, 310          HelpPath directive, 126, 241
  21510.              true path of, 90, 313            Hidden attribute, see File
  21511.           @FILESIZE variable function, 88      attributes
  21512.           @FILETIME variable function, 88     HistMin directive, 130
  21513.           FineSwap directive, 139             HISTORY, 118, 243
  21514.           Floppy disks, 148, 149              History directive, 126
  21515.           FOR, 93, 103, 140, 230              History list, 56, 243
  21516.              and GOSUB, 232                      controlling, 130, 244
  21517.           Form feed character, 95                inheritance in secondary
  21518.           FORMAT /S command, 153                  shells, 139
  21519.           FREE, 234                              memory space for, 126, 269
  21520.              on networks, 160                    reading from a file, 244
  21521.           Free disk space, see disk space     History window, 58, 132
  21522.           Free memory, see Memory             HistWinBegin directive, 137
  21523.           @FULL variable function, 88         HistWinColor directive, 132
  21524.           FullINT2E directive, 139            HistWinDel directive, 137
  21525.                                               HistWinEdit directive, 137
  21526.                                               HistWinEnd directive, 137
  21527.                                               HistWinExec directive, 137
  21528.                                               HistWinHeight directive, 130
  21529.                                               HistWinLeft directive, 130
  21530.  
  21531.  
  21532.           ___________________________________________________________________
  21533.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  370
  21534.  
  21535.                                                                         INDEX
  21536.           ___________________________________________________________________
  21537.  
  21538.  
  21539.           HistWinOpen directive, 137               -- K --
  21540.           HistWinTop directive, 131
  21541.           HistWinWidth directive, 131         Key
  21542.           HMA, see Memory                        codes, 51, 334, 338
  21543.                                                  mapping, 133
  21544.                                                     clearing default key map,
  21545.                -- I --               -- I --               -- I --                               138
  21546.                                                     for all input, 134
  21547.           IF, 93, 103, 140, 245                     for command line editing,
  21548.              conditions, 246                         136
  21549.           IFF, 103, 251                             for history window, 137
  21550.              and GOSUB, 237                         for LIST, 137
  21551.              and GOTO, 108, 252                  names, 124, 177, 254, 258
  21552.              conditions, 246                  Keyboard, 51
  21553.           Include lists, 75                   KEYSTACK, 68, 103, 107, 257
  21554.           @INDEX variable function, 88           programming interface, 345
  21555.           Inherit directive, 139              Keystroke aliases, see Aliases
  21556.           INKEY, 103, 106, 253                KSTACK.COM, 15, 69, 116, 257
  21557.           INPUT, 103, 134, 256
  21558.           Ins directive, 135
  21559.           Installable commands, 346                -- L --
  21560.           Installation, 13
  21561.              manual, 14                       @LABEL variable function, 88
  21562.              reversing, 16                    Labels, in batch files, 237,
  21563.              with monochrome monitor, 14       239
  21564.           INT 2E, 349                         Laptop computers, 150
  21565.           INT 2F, 344                         Left directive, 135
  21566.           @INT variable function, 88          @LEN variable function, 88
  21567.           Internal commands, see Commands     LH, 144, 145, 261
  21568.           Internal variables, 81, see         LIM EMS, see Memory
  21569.            also names of individual           Line feed character, 95
  21570.            variables                          @LINE variable function, 88
  21571.              in aliases, 181                  LineInput directive, 131, 303
  21572.              in batch files, 85, 101          Lines, drawing, on screen, 220,
  21573.           ISALIAS test, in IF and IFF,         221
  21574.            249                                LIST, 262
  21575.           ISDIR test, in IF and IFF, 249         default colors, 132
  21576.           ISINTERNAL test, in IF and IFF,        keys used with, 134, 137
  21577.            249                                   output method, 146
  21578.                                                  screen size, 131, 147, 304
  21579.                                               ListColors directive, 132
  21580.                -- J --                        ListFind directive, 137
  21581.                                               ListHighBit directive, 137
  21582.           JOIN command, 313                   ListNext directive, 137
  21583.                                               ListPrint directive, 137
  21584.                                               ListWrap directive, 137
  21585.                                               Literal keystrokes, 55
  21586.                                               LOADBTM, 100, 103, 264
  21587.  
  21588.  
  21589.           ___________________________________________________________________
  21590.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  371
  21591.  
  21592.                                                                         INDEX
  21593.           ___________________________________________________________________
  21594.  
  21595.  
  21596.           LOADHIGH, 144, 145, 261             MessageServer directive, 139
  21597.           LOG, 107, 118, 266                  Microsoft Windows, 155, 156
  21598.           Log file location, 266                 and secondary shells, 114,
  21599.           LogName directive, 126                  122
  21600.           Lower case, 132, 304                   detecting, 84, 157
  21601.           @LOWER variable function, 89        MKDIR, 268
  21602.           @LPT variable function, 89          _MONITOR internal variable, 84
  21603.                                               Monochrome monitor
  21604.                                                  and HELP, 151, 242
  21605.                -- M --                           and installation, 14
  21606.                                                  and Microsoft Windows, 157
  21607.           Master environment, see             Mouse, in HELP, 64
  21608.            Environment                        MOVE, 270
  21609.           MD, 268                                and extended attributes, 271
  21610.           MEMORY, 145, 163, 269                  and SELECT, 271
  21611.              and QEMM, 145                    MS-DOS, see 4DOS and MS-DOS
  21612.           Memory, 49, 144                     Multiple commands, 61
  21613.              base, 49                            in aliases, 174
  21614.                 4DOS's use of, 144               separator character, 61, 95,
  21615.                 amount of, 87                     130, 302
  21616.                 DOS in, 318                   Multiple filenames, 74
  21617.              expanded (EMS), 49, 50           Multitasking software, 154
  21618.                 4DOS's use of, 144               and disk swapping, 156
  21619.                 amount of, 87, 269               DESQview, 158
  21620.                 hardware, 145                    Microsoft Windows, 156
  21621.                 swapping to, 126, 146,
  21622.                  307
  21623.              extended, 49, 50                      -- N --
  21624.                 4DOS's use of, 145
  21625.                 amount of, 88, 269            @NAME variable function, 89
  21626.              extended (XMS), 50               _NDP internal variable, 84
  21627.                 4DOS's use of, 144, 145       NetwareNames directive, 140
  21628.                 amount of, 91, 269            Networks, 159
  21629.                 swapping to, 126, 307            and pipes, 161
  21630.              free, 269                           disk access problems on, 149
  21631.              high memory area (HMA), 50,         disk space calculations on,
  21632.               145                                 160
  21633.                 DOS in, 318                      disk swapping on, 141, 160
  21634.                 status of, 269                   drive names on, 46
  21635.              problems with, 146                  file and directory names on,
  21636.              upper, 49                            160
  21637.              upper memory blocks (UMBs),      NextFile directive, 136
  21638.               50                              NextHistory directive, 136
  21639.                 4DOS's use of, 128, 144       NextINIFile directive, 140
  21640.                 and LOADHIGH, 261             NoClobber directive, 131, 303
  21641.           Memory resident programs, see       NormalEditKey directive, 136
  21642.            TSRs                               NormalHWinKey directive, 137
  21643.           Messages, displaying, 222, 224
  21644.  
  21645.  
  21646.           ___________________________________________________________________
  21647.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  372
  21648.  
  21649.                                                                         INDEX
  21650.           ___________________________________________________________________
  21651.  
  21652.  
  21653.           NormalKey directive, 134, 135       PATH environment variable
  21654.              and keystroke aliases, 179        (continued)
  21655.           NormalListKey directive, 138           avoiding search of, 35
  21656.           NOT, in IF and IFF, 245, 250,          changing, 226, 274
  21657.            251                                   format of, 274
  21658.           Notebook computers, 150                invalid directory in, 275
  21659.           Novell Netware, 140, 141, 159          length of, 162, 275
  21660.           Numeric coprocessor, 84, 143           searching path, 44
  21661.           Numeric tests, in IF and IFF,          viewing, 274
  21662.            248                                @PATH variable function, 89
  21663.                                               Path, of a file, 45, 47
  21664.                                                  and aliases, 98
  21665.                -- O --                           extracting from full file
  21666.                                                   name, 89
  21667.           Operating system, detecting            finding full path name, 88
  21668.            type of, 83                           finding true path, 90, 313
  21669.           Options                                if omitted, 47
  21670.              in commands, 170                    in executable extensions, 76
  21671.              startup, see Startup Options        in include lists, 75
  21672.           Or (||) in conditional              PAUSE, 103, 106, 276
  21673.            commands, 92                       PauseOnError directive, 121,
  21674.           .OR, in IF and IFF., 245, 250,       126
  21675.            251                                Percent sign, see % sign
  21676.           OS/2                                Pipes, 67, 308
  21677.              4OS2 product, 1                     and networks, 161
  21678.              command grouping, 92             POPD, 217, 277, 281
  21679.              detecting, 83                    PrevFile directive, 136
  21680.              DOS sessions, 9, 83, 141         PrevHistory directive, 136
  21681.                 extended attributes and,      [Primary], see 4DOS.INI
  21682.                  138, 201, 271                Primary shell, see Shell
  21683.                 in OS/2 version 2.0, 42,      Printer
  21684.                  229                             checking status of, 89
  21685.                 titles in, 138                   sending control codes to, 95
  21686.                                                  sending files to, 198
  21687.                                               Programming for 4DOS, see
  21688.                -- P --                         Technical Information
  21689.                                               PROMPT command, 118, 155, 278
  21690.           ParameterChar directive, 131,          ANSI sequences in, 95, 279
  21691.            303                                   changing for secondary
  21692.           Parent directory, 47, 71, 190,          shell, 85
  21693.            192, 268                              environment variables and
  21694.           Parsing, 45                             functions in, 79, 86, 279
  21695.           PATH command, 162, 274              PROMPT environment variable,
  21696.           PATH environment variable, 49,       81, 117
  21697.            81, 117                            Prompt Solution, The, 5
  21698.              "." in, 275                      PUSHD, 217, 277, 281
  21699.              and @SEARCH variable
  21700.               function, 89
  21701.  
  21702.  
  21703.           ___________________________________________________________________
  21704.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  373
  21705.  
  21706.                                                                         INDEX
  21707.           ___________________________________________________________________
  21708.  
  21709.  
  21710.                -- Q --                        _ROW internal variable, 84
  21711.                                               _ROWS internal variable, 84
  21712.           QUIT, 103, 187, 189, 283
  21713.           Quoting, of arguments, 95
  21714.                                                    -- S --
  21715.  
  21716.                -- R --                        SaveHistory directive, 136
  21717.                                               Scan codes, see Key codes
  21718.           RAM, see Memory                     SCREEN, 103, 291
  21719.           RAM disk, 46, 145                   Screen, see also Video
  21720.              swapping to, 126                    clearing, 195
  21721.           RD, 284                                colors, see also Monochrome
  21722.           Read-only attribute, see File           monitor
  21723.            attributes                               and ANSI driver, 53, 132,
  21724.           @READY variable function, 89               302
  21725.           REBOOT, 285                               and cursor, 147
  21726.           Redirection, 66                           in DIR, 212
  21727.              alternative methods, 308,              in HELP, 151, 241
  21728.               322                                   in history window, 132
  21729.              and COLORDIR environment               in LIST, 132, 263
  21730.               variable, 213                         in PROMPT, 279
  21731.              and command grouping, 93               in SELECT, 132, 295
  21732.              and NoClobber, 67, 303                 of boxes, 218
  21733.              capturing batch file output,           of lines, 220, 221
  21734.               107                                   of text, 292, 309, 321
  21735.              nested, 67                             setting defaults, 132,
  21736.              preventing file overwrites,             195, 197, 302
  21737.               131                                   setting, in 4START, 85,
  21738.           Reduce directive, 140                      118
  21739.           Registration, 5                           testing, 82, 83
  21740.           REM, 103, 164, 287                     size, 52, 83, 84, 131, 147,
  21741.              in AUTOEXEC.BAT, 16, 164             303
  21742.              in CONFIG.SYS, 15, 16, 164       ScreenRows directive, 131, 147,
  21743.           @REMOTE variable function, 89        303
  21744.           @REMOVABLE variable function,       SCRPUT, 103, 146, 292
  21745.            89                                 Search path, see PATH
  21746.           REN, 270, 288                        environment variable
  21747.           RENAME, 270, 288                    @SEARCH variable function, 89
  21748.           Replaceable parameters              [Secondary], see 4DOS.INI
  21749.              in aliases, 180, 181             Secondary shell, see Shell
  21750.              in batch files, 101, 306         SELECT, 293
  21751.           ReserveTPA directive, 140              and command grouping, 93
  21752.           RETURN, 103, 237, 290                  and include lists, 75
  21753.           Right directive, 135                   and MOVE, 271
  21754.           RMDIR, 284                             and stack size, 140
  21755.           ROM, booting from, 150                 default colors, 132
  21756.           Root directory, 46                     keys used with, 134
  21757.  
  21758.  
  21759.  
  21760.           ___________________________________________________________________
  21761.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  374
  21762.  
  21763.                                                                         INDEX
  21764.           ___________________________________________________________________
  21765.  
  21766.  
  21767.           SELECT (continued)                  StackSize directive, 140
  21768.              output method, 146               Standard error device, 65, 66
  21769.              screen size, 131, 147, 304       Standard input device, 65, 66,
  21770.           Serial port, 204                     263, 308, 322
  21771.           SET, 78, 298                        Standard output device, 65, 66,
  21772.           SETDOS, 301                          308, 322
  21773.              /A(NSI), 129, 148, 196, 197,     Startup options, 111
  21774.               302                                //iniline, 113, 115, 155
  21775.              /C(ompound character), 130,         @d:\path\inifile, 112, 114,
  21776.               302                                 154
  21777.              /E(scape character), 94,            commands in, 113, 115
  21778.               130, 302                           for secondary shells, 114
  21779.              /I(nternal), 173, 249, 302       StdColors directive, 132
  21780.              /L(ine), 131, 303                Stopwatch, see TIMER
  21781.              /M(ode), 130, 303                String tests, in IF and IFF,
  21782.              /N(o clobber), 131, 303           246
  21783.              /P(arameter character), 131,     Subdirectories, 46
  21784.               303                                attributes of, 183
  21785.              /R(ows), 132, 147, 303              changing, see Changing
  21786.              /S(hape), 129, 147, 304              directories
  21787.              /U(pper), 84, 132, 215, 304         copying, 203
  21788.              /V(erbose), 100, 129, 304           creating, 268
  21789.              and 4DOS.INI, 121, 301              deleting files from, 207
  21790.           SETLOCAL, 102, 103, 105, 305,          descriptions for, 209
  21791.            316                                   executing commands in, 235
  21792.           Shell                                  hidden, 235
  21793.              DOS shell (defined), 1              moving, 270, 272
  21794.              level, 84, 280                      name, maximum length of, 47
  21795.              primary, 42                         removing, 207, 272, 284
  21796.                 and multitaskers, 154,           renaming, 288
  21797.                  156                             testing for, 249
  21798.                 startup options, 111          Subdirectory attribute, see
  21799.              secondary, 42                     File attributes
  21800.                 and COMSPEC, 116              SUBST command, 313
  21801.                 and multitaskers, 154         @SUBSTR variable function, 90
  21802.                 exiting from, 229             Swapping, 126
  21803.                 inheritance, 122, 139,           and compatibility, 146
  21804.                  182, 301                        and multitasking software,
  21805.                 startup options, 114              156
  21806.              visual shell, 42                    enabling and disabling, 307
  21807.           _SHELL internal variable, 84           file names used by, 127,
  21808.           SHELL= line, in CONFIG.SYS, 15,         141, 156
  21809.            42, 111, 151                          on networks, 160
  21810.              and DOS version 2.x, 114            reduced, 140
  21811.           SHIFT, 101, 103, 306                   types of, 127
  21812.           Software compatibility, see         SWAPPING command, 307
  21813.            Compatibility                      Swapping directive, 126, 144,
  21814.           Sound, see BEEP                      161, 165
  21815.  
  21816.  
  21817.           ___________________________________________________________________
  21818.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  375
  21819.  
  21820.                                                                         INDEX
  21821.           ___________________________________________________________________
  21822.  
  21823.  
  21824.           SwapReopen directive, 141                -- U --
  21825.           Switches, in commands, 170
  21826.           System                              UltraVision, 148
  21827.              attribute, see File              UMBEnvironment directive, 128,
  21828.               attributes                       144, 165
  21829.              date, 205                           and DESQview, 159
  21830.              rebooting, 285                   UMBLoad directive, 128, 144,
  21831.              tests, in IF and IFF, 248         165
  21832.              time, 310                           and DESQview, 159
  21833.                                               UMBs, see Memory
  21834.                                               UNALIAS, 105, 315
  21835.                -- T --                        Uninstalling 4DOS, 16
  21836.                                               @UNIQUE variable function, 90
  21837.           Tab character, 95                   UniqueSwapName directive, 127,
  21838.           Task switching software, see         141, 156
  21839.            Multitasking software              UNSET, 78, 102, 316
  21840.           Technical Information, 344          Up directive, 135
  21841.              DESCRIPT.ION, 347                Upgrades, 6
  21842.              detecting 4DOS, 344              Upper case, 132, 304
  21843.              installable commands, 346        @UPPER variable function, 90
  21844.              INT 2E, 349                      UpperCase directive, 132, 215,
  21845.              KEYSTACK, 345                     304
  21846.           Technical support, 5, 7
  21847.           TEE, 308
  21848.           TEMP environment variable, 81,           -- V --
  21849.            117, 161
  21850.           TEMP4DOS environment variable,      Variable expansion, 95
  21851.            81, 117, 161                       Variable functions, 86, see
  21852.           TEXT, 104, 309                       also names of individual
  21853.           THEN, in IFF, 251                    functions
  21854.           TIME, 310                              in aliases, 91, 181
  21855.           _TIME internal variable, 84            in batch files, 91, 101
  21856.           @TIME variable function, 90         VER, 318
  21857.           TIMER, 104, 311                     VERIFY, 203, 319
  21858.           Tour, of 4DOS features, 18          Version numbers, 82, 83, 318
  21859.           TRUENAME, 313                       Vertical text display, 321
  21860.           @TRUENAME variable function,        VGA, 147, 148, 194, 250
  21861.            90, 313                            Video hardware, 52, 146, see
  21862.           TSRs, 153                            also Screen
  21863.              and .BTM files, 264              _VIDEO internal variable, 84
  21864.              and 4START, 118                  VOL, 320
  21865.              and multitasker startup          Volume label, see Disk drives
  21866.               files, 155                      Volume label attribute, see
  21867.              and SETLOCAL, 305                 File attributes
  21868.              and swapping state, 307          VSCRPUT, 104, 146, 321
  21869.              loading order, 165
  21870.           TYPE, 314
  21871.  
  21872.  
  21873.  
  21874.           ___________________________________________________________________
  21875.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  376
  21876.  
  21877.                                                                         INDEX
  21878.           ___________________________________________________________________
  21879.  
  21880.  
  21881.                -- W --
  21882.  
  21883.           Warm reboot, 285
  21884.           Warning mark, see !
  21885.           Wildcards, 71
  21886.              and @SEARCH variable
  21887.               function, 89
  21888.              and filename completion, 60
  21889.              and renaming subdirectories,
  21890.               289
  21891.              extended, 73
  21892.                 and DEL, 149, 207
  21893.              in executable extensions, 78
  21894.              in include lists, 75
  21895.              in multiple filenames, 74
  21896.           _WIN internal variable, 84, 157
  21897.           Windows, see Microsoft Windows
  21898.           @WORD variable function, 90
  21899.           WordLeft directive, 135
  21900.           WordRight directive, 135
  21901.  
  21902.  
  21903.                -- X --
  21904.  
  21905.           XMS, see Memory
  21906.           @XMS variable function, 91
  21907.           .XOR, in IF and IFF., 245, 250,
  21908.            251
  21909.  
  21910.  
  21911.                -- Y --
  21912.  
  21913.           Y, 322
  21914.  
  21915.  
  21916.  
  21917.  
  21918.  
  21919.  
  21920.  
  21921.  
  21922.  
  21923.  
  21924.  
  21925.  
  21926.  
  21927.  
  21928.  
  21929.  
  21930.  
  21931.           ___________________________________________________________________
  21932.           Copyright 1992, JP Software Inc.      4DOS Reference Manual  /  377
  21933.